postgresql/src
Noah Misch 5d94aa4dc3 In REASSIGN OWNED of a database, lock the tuple as mandated.
Commit aac2c9b4fd 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
2024-12-28 07:16:26 -08:00
..
backend In REASSIGN OWNED of a database, lock the tuple as mandated. 2024-12-28 07:16:26 -08:00
bin Fix memory leak in pg_restore with zstd-compressed data. 2024-12-17 22:31:26 -05:00
common meson: Export all libcommon functions in Windows builds 2024-12-25 18:14:30 +02:00
fe_utils Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
include In REASSIGN OWNED of a database, lock the tuple as mandated. 2024-12-28 07:16:26 -08:00
interfaces Fix broken list-munging in ecpg's remove_variables(). 2024-12-01 14:15:37 -05:00
makefiles Use --strip-unneeded when stripping static libraries with GNU strip. 2023-04-20 18:12:32 -04:00
pl Add support for Tcl 9 2024-11-25 12:27:19 +01:00
port meson: Export all libcommon functions in Windows builds 2024-12-25 19:22:41 +02:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test In REASSIGN OWNED of a database, lock the tuple as mandated. 2024-12-28 07:16:26 -08:00
timezone Update time zone data files to tzdata release 2024b. 2024-10-29 11:49:56 -04:00
tools Avoid mislabeling of lateral references, redux. 2024-11-30 12:42:20 -05:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00