On Thu, Sep 19, 2024 at 01:36:36PM -0500, Nathan Bossart wrote: > + PushActiveSnapshot(GetTransactionSnapshot()); > > /* > * Now we must wait until no running transaction could be using > the > @@ -2283,8 +2284,10 @@ index_drop(Oid indexId, bool concurrent, bool > concurrent_lock_mode) > * Again, commit the transaction to make the pg_index update > visible > * to other sessions. > */ > + PopActiveSnapshot(); > CommitTransactionCommand(); > StartTransactionCommand(); > + PushActiveSnapshot(GetTransactionSnapshot()); > > /* > * Wait till every transaction that saw the old index state has > @@ -2387,6 +2390,8 @@ index_drop(Oid indexId, bool concurrent, bool > concurrent_lock_mode) > { > UnlockRelationIdForSession(&heaprelid, > ShareUpdateExclusiveLock); > UnlockRelationIdForSession(&indexrelid, > ShareUpdateExclusiveLock); > + > + PopActiveSnapshot(); > } > }
Perhaps the reason why these snapshots are pushed should be documented with a comment? -- Michael
signature.asc
Description: PGP signature