Re: [GENERAL] BDR question on dboid conflicts

2017-10-26 Thread Craig Ringer
On 27 October 2017 at 01:15, Zhu, Joshua wrote: > Database oid is used in both bdr.bdr_nodes, as node_dboid, and > bdr.bdr_connections, as conn_dboid, also used in construction of replication > slot names. Correct. However, it's used in conjunction with the sysid and node

Re: [GENERAL] query not scaling

2017-10-26 Thread Rob Sargent
On 10/26/2017 09:01 AM, Tom Lane wrote: Laurenz Albe writes: Also, to have PostgreSQL inline the function, which would be good for performance, it should be declared IMMUTABLE. Actually, if you hope to have a SQL function be inlined, it's better not to decorate it

[GENERAL] Combing row returning functions using "ROWS FROM"?

2017-10-26 Thread Guyren Howe
I just noticed the reference to combining set returning functions using “ROWS FROM” at https://www.postgresql.org/docs/10/static/queries-table-expressions.html#queries-tablefunctions I have not

Re: [GENERAL] Bucardo syncrun

2017-10-26 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Emanuel Araújo asked: > Can I purge data on Postgrebucardo table syncrun ? > > If I will follow this steps: > > bucardo stop > psql bucardo > truncate bucardo.syncrun ; > \q > bucardo start > > The steps to purge all past data that table.

[GENERAL] Announcing PostgreSQL SLES RPM Repository

2017-10-26 Thread Devrim Gündüz
Hi, I am proud to announce the new and shiny PostgreSQL RPM repository for SLES 12: https://zypp.postgresql.org/. The new repo contains (almost) all of the packages that the PostgreSQL YUM repository has (https://yum.PostgreSQL.org) . Currently. we support PostgreSQL 10, 9.6 and 9.5, along with

Re: [GENERAL] Question regarding logical replication

2017-10-26 Thread Weiping Qu
Hi. Thank you very much for such detailed explanation. :) We are currently testing the overhead of log-based Change Data Capture method (i.e. logical decoding) over Postgresql. The test setting consists of one processing running TPC-C on node1, which issued transactions against a database

Re: [GENERAL] Question regarding logical replication

2017-10-26 Thread Alvaro Aguayo Garcia-Rada
Hi. I've had experience with both BDR & pglogical. For each replication slot, postgres saves a LSN which points to the last xlog entry read by the client. When a client does not reads xlog, for example, if it cannot connect to the server, then the distance between such

[GENERAL] Question regarding logical replication

2017-10-26 Thread Weiping Qu
Dear postgresql community, I have a question regarding understanding the implementation logic behind logical replication. Assume a replication slot created on the master node, will more and more data get piled up in the slot and the size of replication slot continuously increase if there is

[GENERAL] Bucardo syncrun

2017-10-26 Thread Emanuel Araújo
Hi, Can I purge data on Postgrebucardo table syncrun ? If I will follow this steps: bucardo stop psql bucardo truncate bucardo.syncrun ; \q bucardo start The steps to purge all past data that table. Is correct? Is this Simple method? -- *Atenciosamente,Emanuel Araújo* *Linux Certified,

[GENERAL] BDR question on dboid conflicts

2017-10-26 Thread Zhu, Joshua
Database oid is used in both bdr.bdr_nodes, as node_dboid, and bdr.bdr_connections, as conn_dboid, also used in construction of replication slot names. I noticed that when trying to join a bdr group, if the database oid on the new node happens to be the same as that of an node already in the

Re: [GENERAL] query not scaling

2017-10-26 Thread Rob Sargent
On 10/26/2017 09:01 AM, Tom Lane wrote: Laurenz Albe writes: Also, to have PostgreSQL inline the function, which would be good for performance, it should be declared IMMUTABLE. Actually, if you hope to have a SQL function be inlined, it's better not to decorate it

Re: [GENERAL] query not scaling

2017-10-26 Thread Tom Lane
Laurenz Albe writes: > Also, to have PostgreSQL inline the function, which would be good > for performance, it should be declared IMMUTABLE. Actually, if you hope to have a SQL function be inlined, it's better not to decorate it at all --- not with IMMUTABLE, and not

Re: [GENERAL] query not scaling

2017-10-26 Thread Rob Sargent
> On Oct 26, 2017, at 1:02 AM, Laurenz Albe wrote: > > Rob Sargent wrote: >> I have a query I cannot tame and I'm wondering if there's an alternative >> to the "between" clause I'm using. Perhaps a custom type could do >> better? I've tried the "<@" orperator

Re: [GENERAL] Making subscribers read only in Postgres 10 logical replication

2017-10-26 Thread Peter Eisentraut
On 10/11/17 14:18, rverghese wrote: > I'm testing out logical replication on PostgreSQL 10. Is there a setting to > make subscribers read-only slaves like with Slony. Currently I can insert > into the Publisher and the Subscriber. If there is a conflict, i.e. same > record exists in both, then all

Re: [GENERAL] query not scaling

2017-10-26 Thread Laurenz Albe
Rob Sargent wrote: > I have a query I cannot tame and I'm wondering if there's an alternative > to the "between" clause I'm using. Perhaps a custom type could do > better? I've tried the "<@" orperator and that changes the query plan > significantly but the execution cost/time is not