pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Update TransactionXmin when MyProc->xmin is updated 6+ messages / 1 participants [nested] [flat]
* pgsql: Update TransactionXmin when MyProc->xmin is updated @ 2024-12-21 22:11 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2024-12-21 22:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/578a7fe7b6f8484f6d7caa2fda288abb3fe87aa0 Modified Files -------------- src/backend/utils/time/snapmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Update TransactionXmin when MyProc->xmin is updated @ 2024-12-21 22:11 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2024-12-21 22:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7cfdb4d1e778349b47e34413a26e931d9b07dda6 Modified Files -------------- src/backend/utils/time/snapmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Update TransactionXmin when MyProc->xmin is updated @ 2024-12-21 22:11 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2024-12-21 22:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9d8ab2c461d706ca22adf86c057d4f76ca7f6da6 Modified Files -------------- src/backend/utils/time/snapmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Update TransactionXmin when MyProc->xmin is updated @ 2024-12-21 22:11 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2024-12-21 22:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/acd5c28db5d0cdb9446c5cb09996629f78287b82 Modified Files -------------- src/backend/utils/time/snapmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Update TransactionXmin when MyProc->xmin is updated @ 2024-12-21 22:11 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2024-12-21 22:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/41eafbb494c9578fa04ffa529a10e4cfd6942421 Modified Files -------------- src/backend/utils/time/snapmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Update TransactionXmin when MyProc->xmin is updated @ 2024-12-21 22:11 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2024-12-21 22:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9c1afd3447ffee157422564280df87e59a164476 Modified Files -------------- src/backend/utils/time/snapmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2024-12-21 22:11 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-12-21 22:11 pgsql: Update TransactionXmin when MyProc->xmin is updated Heikki Linnakangas <heikki.linnakangas@iki.fi> 2024-12-21 22:11 pgsql: Update TransactionXmin when MyProc->xmin is updated Heikki Linnakangas <heikki.linnakangas@iki.fi> 2024-12-21 22:11 pgsql: Update TransactionXmin when MyProc->xmin is updated Heikki Linnakangas <heikki.linnakangas@iki.fi> 2024-12-21 22:11 pgsql: Update TransactionXmin when MyProc->xmin is updated Heikki Linnakangas <heikki.linnakangas@iki.fi> 2024-12-21 22:11 pgsql: Update TransactionXmin when MyProc->xmin is updated Heikki Linnakangas <heikki.linnakangas@iki.fi> 2024-12-21 22:11 pgsql: Update TransactionXmin when MyProc->xmin is updated Heikki Linnakangas <heikki.linnakangas@iki.fi>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox