Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-27 Thread Masahiko Sawada
On Fri, Nov 25, 2022 at 5:58 PM Maxim Orlov wrote: > > > > On Fri, 25 Nov 2022 at 09:40, Amit Kapila wrote: >> >> On Thu, Nov 24, 2022 at 4:43 PM Amit Kapila wrote: >> > >> > On Thu, Nov 24, 2022 at 1:48 PM Masahiko Sawada >> > wrote: >> > > >> > > On Wed, Nov 23, 2022 at 12:00 PM Amit Kapila

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-25 Thread Maxim Orlov
On Fri, 25 Nov 2022 at 09:40, Amit Kapila wrote: > On Thu, Nov 24, 2022 at 4:43 PM Amit Kapila > wrote: > > > > On Thu, Nov 24, 2022 at 1:48 PM Masahiko Sawada > wrote: > > > > > > On Wed, Nov 23, 2022 at 12:00 PM Amit Kapila > wrote: > > > > > > Agreed not to have a test case for this. > > >

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-24 Thread Amit Kapila
On Thu, Nov 24, 2022 at 4:43 PM Amit Kapila wrote: > > On Thu, Nov 24, 2022 at 1:48 PM Masahiko Sawada wrote: > > > > On Wed, Nov 23, 2022 at 12:00 PM Amit Kapila > > wrote: > > > > Agreed not to have a test case for this. > > > > I've attached an updated patch. I've confirmed this patch works

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-24 Thread Amit Kapila
On Thu, Nov 24, 2022 at 1:48 PM Masahiko Sawada wrote: > > On Wed, Nov 23, 2022 at 12:00 PM Amit Kapila wrote: > > Agreed not to have a test case for this. > > I've attached an updated patch. I've confirmed this patch works for > all supported branches. > I have slightly changed the checks used

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-24 Thread Maxim Orlov
> > Agreed not to have a test case for this. > > I've attached an updated patch. I've confirmed this patch works for > all supported branches. > > Regards, > > -- > Masahiko Sawada > Amazon Web Services: https://aws.amazon.com > It works for me as well. Thanks! I've created a commitfest entry for

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-24 Thread Masahiko Sawada
On Wed, Nov 23, 2022 at 12:00 PM Amit Kapila wrote: > > On Tue, Nov 22, 2022 at 10:33 PM Maxim Orlov wrote: > >> > >> > >> Regarding the tests, the patch includes a new scenario to > >> reproduce this issue. However, since the issue can be reproduced also > >> by the existing scenario (with low

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-22 Thread Amit Kapila
On Tue, Nov 22, 2022 at 10:33 PM Maxim Orlov wrote: >> >> >> Regarding the tests, the patch includes a new scenario to >> reproduce this issue. However, since the issue can be reproduced also >> by the existing scenario (with low probability, though), I'm not sure >> it's worth adding the new

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-22 Thread Maxim Orlov
> I've attached a draft patch. To fix it, I think we can reset > InitialRunningXacts and NInitialRunningXacts at FreeSnapshotBuilder() > and add an assertion in AllocateSnapshotBuilder() to make sure both > are reset. > Thanks for the patch. It works fine. I've tested this patch for 15 and 11

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-22 Thread Masahiko Sawada
Hi, On Tue, Nov 22, 2022 at 6:37 PM Amit Kapila wrote: > > On Mon, Nov 21, 2022 at 6:17 PM Maxim Orlov wrote: > > > > PROBLEM > > > > After some investigation, I think, the problem is in the snapbuild.c > > (commit 272248a0c1b1, see [0]). We do allocate InitialRunningXacts > > array in the

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-22 Thread Maxim Orlov
> > Thank you for the report and initial analysis. I have added Sawada-San > to know his views as he was the primary author of this work. > > -- > With Regards, > Amit Kapila. > OK, thanks a lot. I hope, we'll fix this soon. -- Best regards, Maxim Orlov.

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-22 Thread Amit Kapila
On Mon, Nov 21, 2022 at 6:17 PM Maxim Orlov wrote: > > PROBLEM > > After some investigation, I think, the problem is in the snapbuild.c (commit > 272248a0c1b1, see [0]). We do allocate InitialRunningXacts > array in the context of builder->context, but for the time when we call >

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-21 Thread Amit Kapila
On Tue, Nov 22, 2022 at 2:22 AM Andres Freund wrote: > > On 2022-11-21 15:47:12 +0300, Maxim Orlov wrote: > > After some investigation, I think, the problem is in the snapbuild.c > > (commit 272248a0c1b1, see [0]). We do allocate InitialRunningXacts > > array in the context of builder->context,

Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-21 Thread Andres Freund
Hi, On 2022-11-21 15:47:12 +0300, Maxim Orlov wrote: > After some investigation, I think, the problem is in the snapbuild.c > (commit 272248a0c1b1, see [0]). We do allocate InitialRunningXacts > array in the context of builder->context, but for the time when we call > SnapBuildPurgeOlderTxn this

[BUG] FailedAssertion in SnapBuildPurgeOlderTxn

2022-11-21 Thread Maxim Orlov
Hi! PREAMBLE For a last couple of months, I stumbled into a problem while running tests on ARM (Debain, aarch64) and some more wired platforms for my 64–bit XIDs patch set. Test contrib/test_decoding (catalog_change_snapshot) rarely failed with the next message: TRAP: