On Wed, 3 Dec 2025 at 12:38, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
Even with 64-bit XIDs, you can't have transactions older than 2^31 still running, right? So AFAICS you can continue using 32-bit XID in LOCKTAG.
Actually, I can, and some brave people do just that. Although it is bad for a number of reasons. The issue is that I can't put on the same page tuples with XIDs that differ by more than 2^31 using the current design (with storing the XIDs "base" on the page). That is why I start thinking
about "real" 64-bit XIDs.
As for my original question, I think, the reason to have MyDatabaseId
in the LOCKTAG is that it's cheaper to store it in the lock, than try to
get it "on demand" in pg_lock_status() call by invoking