diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-12-21 23:42:39 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-12-21 23:42:59 +0200 |
commit | 41eafbb494c9578fa04ffa529a10e4cfd6942421 (patch) | |
tree | 6f65378298293532abcfff758e46f07311151e6f /src/backend/executor/nodeProjectSet.c | |
parent | 23c743b645a546f7ec7aae0a3d7201328d6994b3 (diff) | |
download | postgresql-41eafbb494c9578fa04ffa529a10e4cfd6942421.tar.gz postgresql-41eafbb494c9578fa04ffa529a10e4cfd6942421.zip |
Update TransactionXmin when MyProc->xmin is updated
GetSnapshotData() set TransactionXmin = MyProc->xmin, but when
SnapshotResetXmin() advanced MyProc->xmin, it did not advance
TransactionXmin correspondingly. That meant that TransactionXmin could
be older than MyProc->xmin, and XIDs between than TransactionXmin and
the real MyProc->xmin could be vacuumed away. One known consequence is
in pg_subtrans lookups: we might try to look up the status of an XID
that was already truncated away.
Back-patch to all supported versions.
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/d27a046d-a1e4-47d1-a95c-fbabe41debb4@iki.fi
Diffstat (limited to 'src/backend/executor/nodeProjectSet.c')
0 files changed, 0 insertions, 0 deletions