Re: [BUG] failed assertion in EnsurePortalSnapshotExists()
Drouvot, Bertrand <bdrouvot@amazon.com>
From: "Drouvot, Bertrand" <bdrouvot@amazon.com>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-29T11:12:02Z
Lists: pgsql-hackers
Hi, On 9/29/21 12:59 PM, Ranier Vilela wrote: > > Em qua., 29 de set. de 2021 às 06:55, Drouvot, Bertrand > <bdrouvot@amazon.com> escreveu: > > I'm also inclined to #1. > > I have a stupid question, why duplicate PushActiveSnapshot? > Wouldn't one function be better? > > PushActiveSnapshot(Snapshot snap, int as_level); > > Sample calls: > PushActiveSnapshot(GetTransactionSnapshot(), > GetCurrentTransactionNestLevel()); > PushActiveSnapshot(queryDesc->snapshot, > GetCurrentTransactionNestLevel()); > PushActiveSnapshot(GetTransactionSnapshot(), portal->createSubid); I would say because that could "break" existing extensions for example. Adding a new function prevents "updating" existing extensions making use of PushActiveSnapshot(). Thanks Bertrand
Commits
-
Fix Portal snapshot tracking to handle subtransactions properly.
- e6adaa1795d5 14.1 landed
- cded2c46099e 12.9 landed
- 7b5d4c29ed02 15.0 landed
- 5abbda98594d 11.14 landed
- 04ef2021e3ca 13.5 landed