aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/miscinit.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2024-12-28 07:16:22 -0800
committerNoah Misch <noah@leadboat.com>2024-12-28 07:16:26 -0800
commit83bb52375630ce93660bde938ffba93c6dc7fc63 (patch)
tree38e710ce6777b6b635526c05e21941252bf6ceec /src/backend/utils/init/miscinit.c
parent6c9b3975407dcfaabd195c2e239cdd0451f7fbd1 (diff)
downloadpostgresql-83bb52375630ce93660bde938ffba93c6dc7fc63.tar.gz
postgresql-83bb52375630ce93660bde938ffba93c6dc7fc63.zip
In REASSIGN OWNED of a database, lock the tuple as mandated.
Commit aac2c9b4fde889d13f859c233c2523345e72d32b mandated such locking and attempted to fulfill that mandate, but it missed REASSIGN OWNED. Hence, it remained possible to lose VACUUM's inplace update of datfrozenxid if a REASSIGN OWNED processed that database at the same time. This didn't affect the other inplace-updated catalog, pg_class. For pg_class, REASSIGN OWNED calls ATExecChangeOwner() instead of the generic AlterObjectOwner_internal(), and ATExecChangeOwner() fulfills the locking mandate. Like in GRANT, implement this by following the locking protocol for any catalog subject to the generic AlterObjectOwner_internal(). It would suffice to do this for IsInplaceUpdateOid() catalogs only. Back-patch to v13 (all supported versions). Kirill Reshke. Reported by Alexander Kukushkin. Discussion: https://postgr.es/m/CAFh8B=mpKjAy4Cuun-HP-f_vRzh2HSvYFG3rhVfYbfEBUhBAGg@mail.gmail.com
Diffstat (limited to 'src/backend/utils/init/miscinit.c')
0 files changed, 0 insertions, 0 deletions