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 <[email protected]>
Author: Fujii Masao <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Reviewed-by: Thomas Munro <[email protected]>
Discussion:
https://postgr.es/m/70BF24D6-DC51-443F-B55A-95735803842A%40amazon.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/57cb8063089a7d6c54e27adfd5d028cc01f21536
Modified Files
--------------
src/backend/access/transam/xlog.c | 8 ++++++++
1 file changed, 8 insertions(+)