Re: [BUG] failed assertion in EnsurePortalSnapshotExists() - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: [BUG] failed assertion in EnsurePortalSnapshotExists()
Date
Msg-id d0805e5a-f225-b955-fe6d-85505a6004ea@amazon.com
Whole thread Raw
In response to Re: [BUG] failed assertion in EnsurePortalSnapshotExists()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUG] failed assertion in EnsurePortalSnapshotExists()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 9/27/21 9:44 PM, Tom Lane wrote:
> "Drouvot, Bertrand" <bdrouvot@amazon.com> writes:
>> I recently observed a failed assertion in EnsurePortalSnapshotExists().
> Hmm, interesting.
Thanks for looking at it!
>   If I take out the "update bdt2" step, so that the
> exception clause is just COMMIT, then I get something different:
>
> ERROR:  portal snapshots (1) did not account for all active snapshots (0)
> CONTEXT:  PL/pgSQL function inline_code_block line 8 at COMMIT

FWIW, I just gave it a try and it looks like this is also "fixed" by the 
proposed patch.

Does it make sense (as it is currently) to set the ActiveSnapshot to 
NULL and not ensuring the same is done for ActivePortal->portalSnapshot?

Or does it mean we should not reach a state where we set ActiveSnapshot 
to NULL while ActivePortal->portalSnapshot is not already NULL?

Thanks

Bertrand




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: row filtering for logical replication
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)