postgresql/src
Thomas Munro c558e6fd92 Acquire ControlFileLock in relevant SQL functions.
Commit dc7d70ea added functions that read the control file, but didn't
acquire ControlFileLock.  With unlucky timing, file systems that have
weak interlocking like ext4 and ntfs could expose partially overwritten
contents, and the checksum would fail.

Back-patch to all supported releases.

Reviewed-by: David Steele <david@pgmasters.net>
Reviewed-by: Anton A. Melnikov <aamelnikov@inbox.ru>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/20221123014224.xisi44byq3cf5psi%40awork3.anarazel.de
2023-10-16 10:43:47 +13:00
..
backend Acquire ControlFileLock in relevant SQL functions. 2023-10-16 10:43:47 +13:00
bin Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:46 -07:00
common Restore proper linkage of pg_char_to_encoding() and friends. 2023-10-07 12:08:10 -04:00
fe_utils Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:46 -07:00
include Dissociate btequalimage() from interval_ops, ending its deduplication. 2023-10-14 16:33:51 -07:00
interfaces Add some const qualifiers 2023-09-26 11:28:57 +01:00
makefiles Remove --disable-thread-safety and related code. 2023-07-12 08:20:43 +12:00
pl Remove environment sensitivity in pl/tcl regression test. 2023-09-29 20:21:10 -04:00
port Meson: check for pg_config_paths.h left over from make 2023-08-24 10:33:53 +12:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Dissociate btequalimage() from interval_ops, ending its deduplication. 2023-10-14 16:33:51 -07:00
timezone Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
tools Improve the naming in wal_sync_method code. 2023-10-13 15:16:45 -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