pgsql: Close race condition between datfrozen and relfrozen updates.

2024-04-29 Thread Noah Misch
Close race condition between datfrozen and relfrozen updates.

vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value.  Not so if a concurrent vac_update_relstats() did an inplace
update.  Commit 2d2e40e3befd8b9e0d2757554537345b15fa6ea2 fixed the same
kind of bug in vac_truncate_clog().  Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field.  A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).

Discussion: https://postgr.es/m/20240423003956.e7.nmi...@google.com

Branch
--
REL_16_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/92685c389d5416f87553bfb80205d79d5670a695

Modified Files
--
src/backend/commands/vacuum.c | 28 
1 file changed, 16 insertions(+), 12 deletions(-)



pgsql: Close race condition between datfrozen and relfrozen updates.

2024-04-29 Thread Noah Misch
Close race condition between datfrozen and relfrozen updates.

vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value.  Not so if a concurrent vac_update_relstats() did an inplace
update.  Commit 2d2e40e3befd8b9e0d2757554537345b15fa6ea2 fixed the same
kind of bug in vac_truncate_clog().  Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field.  A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).

Discussion: https://postgr.es/m/20240423003956.e7.nmi...@google.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/f65ab862e3b8d96c6886641155d9447bc73b5126

Modified Files
--
src/backend/commands/vacuum.c | 28 
1 file changed, 16 insertions(+), 12 deletions(-)



pgsql: Close race condition between datfrozen and relfrozen updates.

2024-04-29 Thread Noah Misch
Close race condition between datfrozen and relfrozen updates.

vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value.  Not so if a concurrent vac_update_relstats() did an inplace
update.  Commit 2d2e40e3befd8b9e0d2757554537345b15fa6ea2 fixed the same
kind of bug in vac_truncate_clog().  Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field.  A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).

Discussion: https://postgr.es/m/20240423003956.e7.nmi...@google.com

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/70cadfba0c70b25922d0739a9e09d24f0efd7f46

Modified Files
--
src/backend/commands/vacuum.c | 28 
1 file changed, 16 insertions(+), 12 deletions(-)



pgsql: Close race condition between datfrozen and relfrozen updates.

2024-04-29 Thread Noah Misch
Close race condition between datfrozen and relfrozen updates.

vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value.  Not so if a concurrent vac_update_relstats() did an inplace
update.  Commit 2d2e40e3befd8b9e0d2757554537345b15fa6ea2 fixed the same
kind of bug in vac_truncate_clog().  Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field.  A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).

Discussion: https://postgr.es/m/20240423003956.e7.nmi...@google.com

Branch
--
REL_15_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/7c5915c4b16c965124a36615ec54cca501a212a9

Modified Files
--
src/backend/commands/vacuum.c | 28 
1 file changed, 16 insertions(+), 12 deletions(-)



pgsql: Close race condition between datfrozen and relfrozen updates.

2024-04-29 Thread Noah Misch
Close race condition between datfrozen and relfrozen updates.

vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value.  Not so if a concurrent vac_update_relstats() did an inplace
update.  Commit 2d2e40e3befd8b9e0d2757554537345b15fa6ea2 fixed the same
kind of bug in vac_truncate_clog().  Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field.  A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).

Discussion: https://postgr.es/m/20240423003956.e7.nmi...@google.com

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/f222349c4ec061705e121548d2fe646b4d03ccdf

Modified Files
--
src/backend/commands/vacuum.c | 28 
1 file changed, 16 insertions(+), 12 deletions(-)



pgsql: Close race condition between datfrozen and relfrozen updates.

2024-04-29 Thread Noah Misch
Close race condition between datfrozen and relfrozen updates.

vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value.  Not so if a concurrent vac_update_relstats() did an inplace
update.  Commit 2d2e40e3befd8b9e0d2757554537345b15fa6ea2 fixed the same
kind of bug in vac_truncate_clog().  Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field.  A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).

Discussion: https://postgr.es/m/20240423003956.e7.nmi...@google.com

Branch
--
REL_14_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/2ca19aa8165c6bec84c1d527fc5f3100c2161b1a

Modified Files
--
src/backend/commands/vacuum.c | 28 
1 file changed, 16 insertions(+), 12 deletions(-)