Re: [BUG] failed assertion in EnsurePortalSnapshotExists()

From: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [BUG] failed assertion in EnsurePortalSnapshotExists()
Date: 2021-09-28 04:24:42
Message-ID: d0805e5a-f225-b955-fe6d-85505a6004ea@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 9/27/21 9:44 PM, Tom Lane wrote:
> "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-09-28 04:33:58 Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)
Previous Message Amit Kapila 2021-09-28 04:09:30 Re: row filtering for logical replication