[GENERAL] Logical replication + before trigger = ERROR: attempted to lock invisible tuple

2017-11-13 Thread Thomas Rosenstein
Hi, I'm trying to execute a BEFORE UPDATE trigger for my logical replication subscription with Postgresql 10.1 but the apply worker crashes with: ERROR: attempted to lock invisible tuple The trigger creation: CREATE TRIGGER customers_anonymize_before_update BEFORE UPDATE ON customers FOR

[GENERAL] Logical replication - behavior of REFRESH PUBLICATION's copy_data option

2017-10-20 Thread Adam LaMore
Hi all, I'm exploring the new PG10 logical replication feature and trying to understand how ALTER SUBSCRIPTION ... REFRESH PUBLICATION works. My planned publication will have over 100 tables, some of which are quite large. If I add a table to the publication, I understand that I have to use the

Re: [GENERAL] Logical Replication - test_decoding - unchanged-toast-datum

2017-09-27 Thread Andres Freund
On 2017-09-28 08:19:08 +0800, Craig Ringer wrote: > This is one of the MANY reasons test_decoding isn't suitable as the base > for a replication solution. It has "test" in its name for a reason. FWIW, I don't see why the unchanged toast stuff is that. It's clearly discernible from actual datums,

Re: [GENERAL] Logical Replication - test_decoding - unchanged-toast-datum

2017-09-27 Thread Craig Ringer
On 26 September 2017 at 05:01, Abhinav Singh wrote: > Hello, > > I am currently using PostgreSQL Community version 9.4.9 and then using > this instance, I am doing logical replication(using replication slots). I > have created the replication slots using the following

[GENERAL] Logical Replication - test_decoding - unchanged-toast-datum

2017-09-27 Thread Abhinav Singh
Hello, I am currently using PostgreSQL Community version 9.4.9 and then using this instance, I am doing logical replication(using replication slots). I have created the replication slots using the following query: SELECT xlog_position FROM

[GENERAL] logical replication API to read WAL file through replication slot

2017-09-06 Thread Dipesh Dangol
hi, I am trying to implement logical replication stream API of postgresql. I am facing unusual connection breakdown problem. Here is the simple code that I am using to read WAL file: String url = "jdbc:postgresql://pcnode2:5432/benchmarksql"; Properties props = new Properties();

Re: [GENERAL] logical replication in PG10 BETA

2017-05-25 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Thursday, May 25, 2017 3:13 PM To: Igor Neyman <iney...@perceptron.com>; George Neuner <gneun...@comcast.net>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BE

Re: [GENERAL] logical replication in PG10 BETA

2017-05-25 Thread Adrian Klaver
On 05/25/2017 11:09 AM, Igor Neyman wrote: __ Adrian, thanks for trying to help. Even though the role I'm using (user=repl_user) has REPLICATION attribute, I thought your question about

Re: [GENERAL] logical replication in PG10 BETA

2017-05-25 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, May 24, 2017 7:06 PM To: Igor Neyman <iney...@perceptron.com>; George Neuner <gneun...@comcast.net>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BE

Re: [GENERAL] logical replication in PG10 BETA

2017-05-24 Thread Adrian Klaver
t.net>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA So take the local line out of pg_hba. Then from the machine that is the subscriber do: psql -d repl -h pub_machine -p 5432 -U repl_user -- Adrian Klaver a

Re: [GENERAL] logical replication in PG10 BETA

2017-05-24 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, May 24, 2017 10:00 AM To: Igor Neyman <iney...@perceptron.com>; George Neuner <gneun...@comcast.net>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BET

Re: [GENERAL] logical replication in PG10 BETA

2017-05-24 Thread Adrian Klaver
Re: [GENERAL] logical replication in PG10 BETA So take the local line out of pg_hba. Then from the machine that is the subscriber do: psql -d repl -h pub_machine -p 5432 -U repl_user -- Adrian Klaver adrian.kla...

Re: [GENERAL] logical replication in PG10 BETA

2017-05-24 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, May 23, 2017 7:42 PM To: Igor Neyman <iney...@perceptron.com>; George Neuner <gneun...@comcast.net>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BE

Re: [GENERAL] logical replication in PG10 BETA

2017-05-24 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, May 23, 2017 5:48 PM To: Igor Neyman <iney...@perceptron.com>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/23/2017 08:15 AM, Igor Neyman

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Adrian Klaver
On 05/23/2017 01:38 PM, Igor Neyman wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of George Neuner Windows does not support "local" domain sockets as in Unix/Linux. Local loopback connections on Windows are

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Adrian Klaver
On 05/23/2017 08:15 AM, Igor Neyman wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver Sent: Tuesday, May 23, 2017 10:04 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of George Neuner Sent: Tuesday, May 23, 2017 4:22 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On Tue, 23 May 2017 15:15:46

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread George Neuner
On Tue, 23 May 2017 15:15:46 +, Igor Neyman wrote: >Interestingly, when I add this line to pg_hba.conf: > >localall all md5 > >Postgres is not starting with the following error in the log file: > >2017-05-23 11:02:10.397 EDT [4796] LOG:

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver Sent: Tuesday, May 23, 2017 10:04 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/23/2017 06:52 AM, Igor

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, May 23, 2017 10:31 AM To: Igor Neyman <iney...@perceptron.com>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/23/2017 07:05 AM, Igor Neyman

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Adrian Klaver
On 05/23/2017 07:05 AM, Igor Neyman wrote: pg_hba.conf modified to allow "replication" user to connect to the server. In the original email I mentioned that I configured Postgres_fdw foreign server that connects using the same connection options as I'm using in CREATE SUBSCRIPTION, and

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, May 23, 2017 9:45 AM To: Igor Neyman <iney...@perceptron.com>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/23/2017 06:33 AM, Igor Neyman

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Adrian Klaver
On 05/23/2017 06:52 AM, Igor Neyman wrote: sounds more like a SSL setup problem between the two Postgres servers, not really related to logical replication. Can you try to setup the connections without SSL?

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Thomas Kellerer Sent: Tuesday, May 23, 2017 9:46 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA Igor Neyman schrieb am

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Thomas Kellerer
Igor Neyman schrieb am 22.05.2017 um 21:33: > Does built-in logical replication work on Windows in PG10 BETA release? > > I can’t make it working so far. > > I created Publication on “source” PG server, but when I’m trying to CREATE > SUBSCRIPTION… on “destination” server, I’m getting: > >

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Adrian Klaver
On 05/23/2017 06:33 AM, Igor Neyman wrote: Yeah, my mistake I was working with pglogical and it got stuck in my head. Any other ideas? Have you gone through these sections of the docs?: https://www.postgresql.org/docs/10/static/logical-replication-config.html

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, May 23, 2017 9:26 AM To: Igor Neyman <iney...@perceptron.com>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/23/2017 06:17 AM, Igor Neyman

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Adrian Klaver
On 05/23/2017 06:17 AM, Igor Neyman wrote: -Original Message- "ERROR: could not connect to the publisher: could not send data to server: Socket is not connected (0x2749/10057) could not send SSL negotiation packet: Socket is not connected (0x2749/10057) SQL state: XX000" In

Re: [GENERAL] logical replication in PG10 BETA

2017-05-23 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Monday, May 22, 2017 7:56 PM To: Igor Neyman <iney...@perceptron.com>; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/22/2017 12:33 PM, Igor Neyman wrote

Re: [GENERAL] logical replication in PG10 BETA

2017-05-22 Thread Adrian Klaver
On 05/22/2017 12:33 PM, Igor Neyman wrote: Hi, Does built-in logical replication work on Windows in PG10 BETA release? Short version: Maybe. Long version: AFAIK to run on Windows you need to build pglogical 2.0 from source master branch. So what version of pglogical and how did you

[GENERAL] logical replication in PG10 BETA

2017-05-22 Thread Igor Neyman
Hi, Does built-in logical replication work on Windows in PG10 BETA release? I can't make it working so far. I created Publication on "source" PG server, but when I'm trying to CREATE SUBSCRIPTION... on "destination" server, I'm getting: "ERROR: could not connect to the publisher: could not send

Re: [GENERAL] Logical replication

2017-05-04 Thread Adrian Klaver
On 05/01/2017 09:34 AM, Adrian Klaver wrote: > On 05/01/2017 09:25 AM, Peter Eisentraut wrote: >> On 5/1/17 10:32, Adrian Klaver wrote: >>> On 04/30/2017 09:07 AM, Adrian Klaver wrote: I have started looking at the logical replication feature in Postgres 10. One thing I have no been able

Re: [GENERAL] Logical replication

2017-05-01 Thread Adrian Klaver
On 05/01/2017 09:25 AM, Peter Eisentraut wrote: On 5/1/17 10:32, Adrian Klaver wrote: On 04/30/2017 09:07 AM, Adrian Klaver wrote: I have started looking at the logical replication feature in Postgres 10. One thing I have no been able to determine is the interoperability between it and

Re: [GENERAL] Logical replication

2017-05-01 Thread Peter Eisentraut
On 5/1/17 10:32, Adrian Klaver wrote: > On 04/30/2017 09:07 AM, Adrian Klaver wrote: >> I have started looking at the logical replication feature in Postgres >> 10. One thing I have no been able to determine is the interoperability >> between it and

Re: [GENERAL] Logical replication

2017-05-01 Thread Adrian Klaver
On 04/30/2017 09:07 AM, Adrian Klaver wrote: I have started looking at the logical replication feature in Postgres 10. One thing I have no been able to determine is the interoperability between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I know the one is derived from the

[GENERAL] Logical replication

2017-04-30 Thread Adrian Klaver
I have started looking at the logical replication feature in Postgres 10. One thing I have no been able to determine is the interoperability between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I know the one is derived from the other, what I can not find is whether a

[GENERAL] Logical Replication: adjacent COMMIT messages with the wrong StartLSN

2017-03-29 Thread Stefan Smith
Hi, I have been evaluating the logical replication feature in v42.0.0 against postgres v9.6. One scenario I'm testing is streaming a high volume of transactions, where each transaction contains multiple INSERTs. Sometimes, two transaction COMMITS are side by side in the DB transaction log, and