Update TransactionXmin when MyProc->xmin is updated
Heikki Linnakangas <heikki.linnakangas@iki.fi>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/time/snapmgr.c | modified | +2 −2 |
Discussion
- TransactionXmin != MyProc->xmin 4 messages · 2024-12-12 → 2024-12-21