Re: Problem with logical replication

2020-05-16 Thread Michael Paquier
On Fri, May 15, 2020 at 08:48:53AM -0300, Euler Taveira wrote: > On Fri, 15 May 2020 at 02:47, Michael Paquier wrote: >> Agreed. I don't think either that we need to update this comment. I >> was playing with this patch and what you have here looks fine by me. >> Two nits: the extra parenthesis

Re: Problem with logical replication

2020-05-15 Thread Euler Taveira
On Fri, 15 May 2020 at 02:47, Michael Paquier wrote: > > Agreed. I don't think either that we need to update this comment. I > was playing with this patch and what you have here looks fine by me. > Two nits: the extra parenthesis in the assert are not necessary, and > the indentation had some

Re: Problem with logical replication

2020-05-14 Thread Michael Paquier
On Tue, May 12, 2020 at 09:45:45PM -0300, Euler Taveira wrote: >> In any case, it seems to me that the comment of >> build_replindex_scan_key needs to be updated. >> >> * This is not generic routine, it expects the idxrel to be replication >> * identity of a rel and meet all limitations

Re: Problem with logical replication

2020-05-12 Thread Dilip Kumar
On Wed, May 13, 2020 at 6:15 AM Euler Taveira wrote: > > On Tue, 12 May 2020 at 06:36, Masahiko Sawada > wrote: >> >> On Mon, 11 May 2020 at 16:28, Michael Paquier wrote: >> > >> > On Sun, May 10, 2020 at 07:08:03PM -0300, Euler Taveira wrote: >> > > I attached a patch with the described

Re: Problem with logical replication

2020-05-12 Thread Euler Taveira
On Tue, 12 May 2020 at 06:36, Masahiko Sawada < masahiko.saw...@2ndquadrant.com> wrote: > On Mon, 11 May 2020 at 16:28, Michael Paquier wrote: > > > > On Sun, May 10, 2020 at 07:08:03PM -0300, Euler Taveira wrote: > > > I attached a patch with the described solution. I also included a test >

Re: Problem with logical replication

2020-05-12 Thread Masahiko Sawada
On Mon, 11 May 2020 at 16:28, Michael Paquier wrote: > > On Sun, May 10, 2020 at 07:08:03PM -0300, Euler Taveira wrote: > > I attached a patch with the described solution. I also included a test that > > covers this scenario. > > - Assert(RelationGetReplicaIndex(rel) ==

Re: Problem with logical replication

2020-05-11 Thread Michael Paquier
On Sun, May 10, 2020 at 07:08:03PM -0300, Euler Taveira wrote: > I attached a patch with the described solution. I also included a test that > covers this scenario. - Assert(RelationGetReplicaIndex(rel) == RelationGetRelid(idxrel)); + Assert(GetRelationIdentityOrPK(rel) ==

Re: Problem with logical replication

2020-05-10 Thread Euler Taveira
On Mon, 20 Apr 2020 at 10:25, Masahiko Sawada < masahiko.saw...@2ndquadrant.com> wrote: > On Thu, 16 Apr 2020 at 17:48, Dilip Kumar wrote: > > I could reproduce this issue by the steps you shared. For the bug fix > patch, I basically agree to remove that assertion from >

Re: Problem with logical replication

2020-04-20 Thread Masahiko Sawada
On Thu, 16 Apr 2020 at 17:48, Dilip Kumar wrote: > > While try to setup a cascading replication, I have observed that if we > set the REPLICA IDENTITY to FULL on the subscriber side then there is > an Assert hit. > > After analysis I have found that, when we set the REPLICA IDENTITY to > FULL on

Re: Problem with logical replication (crash with REPLICA IDENTITY FULL and cascading replication)

2020-04-16 Thread Justin Pryzby
Confirmed and added to opened items - this is a live bug back to v10. for a in data data1; do ./tmp_install/usr/local/pgsql/bin/initdb -D $a --no-sync& done; wait echo "wal_level = logical">> data/postgresql.conf; echo "port=5433" >> data1/postgresql.conf for a in data data1; do

Problem with logical replication

2020-04-16 Thread Dilip Kumar
While try to setup a cascading replication, I have observed that if we set the REPLICA IDENTITY to FULL on the subscriber side then there is an Assert hit. After analysis I have found that, when we set the REPLICA IDENTITY to FULL on subscriber side (because I wanted to make this a publisher for