Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-29 Thread Dilip Kumar
On Thu, Apr 29, 2021 at 5:24 PM Amit Kapila wrote: > > On Tue, Apr 27, 2021 at 5:18 PM Dilip Kumar wrote: > > > > I have modified the patch based on the above comments. > > > > The patch looks good to me. I have slightly modified the comments and > commit message. See, what you think of the attac

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-29 Thread Amit Kapila
On Tue, Apr 27, 2021 at 5:18 PM Dilip Kumar wrote: > > I have modified the patch based on the above comments. > The patch looks good to me. I have slightly modified the comments and commit message. See, what you think of the attached? I think we can leave the test for this as there doesn't seem t

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-29 Thread Dilip Kumar
On Thu, Apr 29, 2021 at 12:09 PM tanghy.f...@fujitsu.com wrote: > > > On Thursday, April 29, 2021 3:18 PM, Dilip Kumar wrote > > >I tried to think about how to write a test case for this scenario, but > >I think it will not be possible to generate an automated test case for this. > >Basically, we

RE: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-28 Thread tanghy.f...@fujitsu.com
On Thursday, April 29, 2021 3:18 PM, Dilip Kumar wrote >I tried to think about how to write a test case for this scenario, but >I think it will not be possible to generate an automated test case for this. >Basically, we need 2 concurrent transactions and out of that, >we need one transaction w

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-28 Thread Dilip Kumar
On Wed, Apr 28, 2021 at 1:02 PM Dilip Kumar wrote: > > On Wed, Apr 28, 2021 at 12:25 PM tanghy.f...@fujitsu.com > wrote: > > > > > I have modified the patch based on the above comments. > > > > Thanks for your patch. > > I tested again after applying your patch and the problem is fixed. > > Thank

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-28 Thread Dilip Kumar
On Wed, Apr 28, 2021 at 12:25 PM tanghy.f...@fujitsu.com wrote: > > > I have modified the patch based on the above comments. > > Thanks for your patch. > I tested again after applying your patch and the problem is fixed. Thanks for confirming. -- Regards, Dilip Kumar EnterpriseDB: http://www.en

RE: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-27 Thread tanghy.f...@fujitsu.com
> I have modified the patch based on the above comments. Thanks for your patch. I tested again after applying your patch and the problem is fixed. Regards Tang

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-27 Thread Dilip Kumar
On Tue, Apr 27, 2021 at 12:55 PM Amit Kapila wrote: > > On Tue, Apr 27, 2021 at 12:22 PM Dilip Kumar wrote: > > > > On Tue, Apr 27, 2021 at 12:05 PM Amit Kapila > > wrote: > > > > > Can't we use 'txns_by_base_snapshot_lsn' list for this purpose? It is > > > > > ensured in ReorderBufferSetBaseSn

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-27 Thread Amit Kapila
On Tue, Apr 27, 2021 at 12:22 PM Dilip Kumar wrote: > > On Tue, Apr 27, 2021 at 12:05 PM Amit Kapila wrote: > > > > Can't we use 'txns_by_base_snapshot_lsn' list for this purpose? It is > > > > ensured in ReorderBufferSetBaseSnapshot that we always assign > > > > base_snapshot to a top-level tran

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Dilip Kumar
On Tue, Apr 27, 2021 at 12:05 PM Amit Kapila wrote: > > > Can't we use 'txns_by_base_snapshot_lsn' list for this purpose? It is > > > ensured in ReorderBufferSetBaseSnapshot that we always assign > > > base_snapshot to a top-level transaction if the current is a known > > > subxact. I think that w

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Amit Kapila
On Tue, Apr 27, 2021 at 11:50 AM Dilip Kumar wrote: > > On Tue, Apr 27, 2021 at 11:43 AM Amit Kapila wrote: > > > > On Mon, Apr 26, 2021 at 7:52 PM Dilip Kumar wrote: > > > > > > On Mon, Apr 26, 2021 at 6:59 PM Amit Kapila > > > wrote: > > > > > > > > On Mon, Apr 26, 2021 at 5:55 PM Dilip Kuma

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Dilip Kumar
On Tue, Apr 27, 2021 at 11:43 AM Amit Kapila wrote: > > On Mon, Apr 26, 2021 at 7:52 PM Dilip Kumar wrote: > > > > On Mon, Apr 26, 2021 at 6:59 PM Amit Kapila wrote: > > > > > > On Mon, Apr 26, 2021 at 5:55 PM Dilip Kumar wrote: > > > > > > > > I am able to reproduce this and I think I have don

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Amit Kapila
On Mon, Apr 26, 2021 at 7:52 PM Dilip Kumar wrote: > > On Mon, Apr 26, 2021 at 6:59 PM Amit Kapila wrote: > > > > On Mon, Apr 26, 2021 at 5:55 PM Dilip Kumar wrote: > > > > > > I am able to reproduce this and I think I have done the initial > > > investigation. > > > > > > The cause of the issu

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Dilip Kumar
On Mon, Apr 26, 2021 at 7:52 PM Dilip Kumar wrote: > > On Mon, Apr 26, 2021 at 6:59 PM Amit Kapila wrote: > > > > On Mon, Apr 26, 2021 at 5:55 PM Dilip Kumar wrote: > > > > > > I am able to reproduce this and I think I have done the initial > > > investigation. > > > > > > The cause of the issu

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Dilip Kumar
On Mon, Apr 26, 2021 at 6:59 PM Amit Kapila wrote: > > On Mon, Apr 26, 2021 at 5:55 PM Dilip Kumar wrote: > > > > I am able to reproduce this and I think I have done the initial > > investigation. > > > > The cause of the issue is that, this transaction has only one change > > and that change is

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Amit Kapila
On Mon, Apr 26, 2021 at 5:55 PM Dilip Kumar wrote: > > On Mon, Apr 26, 2021 at 1:26 PM Dilip Kumar wrote: > > > > On Mon, 26 Apr 2021 at 12:45 PM, tanghy.f...@fujitsu.com > > wrote: > >> > >> Hi > >> > >> I think I may found a bug when using streaming in logical replication. > >> Could anyone

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Dilip Kumar
On Mon, Apr 26, 2021 at 1:26 PM Dilip Kumar wrote: > > On Mon, 26 Apr 2021 at 12:45 PM, tanghy.f...@fujitsu.com > wrote: >> >> Hi >> >> I think I may found a bug when using streaming in logical replication. Could >> anyone please take a look at this? >> >> Here's what I did to produce the probl

Re: [BUG] "FailedAssertion" reported when streaming in logical replication

2021-04-26 Thread Dilip Kumar
On Mon, 26 Apr 2021 at 12:45 PM, tanghy.f...@fujitsu.com < tanghy.f...@fujitsu.com> wrote: > Hi > > I think I may found a bug when using streaming in logical replication. > Could anyone please take a look at this? > > Here's what I did to produce the problem. > I set logical_decoding_work_mem and