Re: table_tuple_lock's snapshot argument

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-03-10T16:52:50Z
Lists: pgsql-hackers
On 10/03/2025 18:20, Ranier Vilela wrote:
> Just for curiosity.
> *RelationFindReplTupleSeq* on the same source, does not suffer
> from the same issue?
> 
> PushActiveSnapshot(GetLatestSnapshot());
> 
> res = table_tuple_lock(rel, &(outslot->tts_tid), GetLatestSnapshot(),

:facepalm: yep, it sure does, and FindConflictTuple() too. Thanks, I'll 
go fix those too.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




Commits

  1. Fix a few more redundant calls of GetLatestSnapshot()

  2. Fix snapshot used in logical replication index lookup

  3. tableam: Add tuple_{insert, delete, update, lock} and use.