postgresql/src
Thomas Munro acefa2cca6 Fix locking bugs that could corrupt pg_control.
The redo routines for XLOG_CHECKPOINT_{ONLINE,SHUTDOWN} must acquire
ControlFileLock before modifying ControlFile->checkPointCopy, or the
checkpointer could write out a control file with a bad checksum.

Likewise, XLogReportParameters() must acquire ControlFileLock before
modifying ControlFile and calling UpdateControlFile().

Back-patch to all supported releases.

Author: Nathan Bossart <bossartn@amazon.com>
Author: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/70BF24D6-DC51-443F-B55A-95735803842A%40amazon.com
2020-06-08 13:58:10 +12:00
..
backend Fix locking bugs that could corrupt pg_control. 2020-06-08 13:58:10 +12:00
bin Rethink definition of cancel.c's CancelRequested flag. 2020-06-07 13:07:34 -04:00
common Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
fe_utils Rethink definition of cancel.c's CancelRequested flag. 2020-06-07 13:07:34 -04:00
include Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:31 +09:00
interfaces Try to read data from the socket in pqSendSome's write_failed paths. 2020-06-07 13:44:13 -04:00
makefiles
pl Clear some style deviations. 2020-05-21 08:31:16 -07:00
port Clear some style deviations. 2020-05-21 08:31:16 -07:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:31 +09:00
timezone Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
tools MSVC: Avoid warning when testing a TAP suite without PROVE_FLAGS. 2020-06-07 16:27:17 -07:00
tutorial
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in
Makefile.shlib
nls-global.mk