postgresql/src/backend
Thomas Munro 72766ad639 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:35 +12:00
..
access Fix locking bugs that could corrupt pg_control. 2020-06-08 13:58:35 +12:00
bootstrap Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
catalog Preserve pg_index.indisreplident across REINDEX CONCURRENTLY 2020-06-05 10:29:27 +09:00
commands Add missing error code to "cannot attach index ..." error. 2020-05-28 12:37:45 +03:00
executor Fix assertion with relation using REPLICA IDENTITY FULL in subscriber 2020-05-16 18:16:31 +09:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit llvmjit: Fix building against LLVM 11 by removing unnecessary include. 2020-05-28 15:25:15 -07:00
lib Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
libpq gss: add missing references to hostgssenc and hostnogssenc 2020-05-25 20:19:28 -04:00
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
optimizer Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
parser Fix CREATE TABLE LIKE INCLUDING GENERATED column order issue 2020-04-09 16:34:30 +02:00
partitioning Fix two typos in a comment 2020-05-22 17:39:16 -04:00
po Translation updates 2020-05-11 13:19:18 +02:00
port Fix race condition in our Windows signal emulation. 2019-12-09 15:03:51 -05:00
postmaster Fix GSS client to non-GSS server connection 2020-05-02 11:39:32 -04:00
regex Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
replication Fix instance of elog() called while holding a spinlock 2020-06-04 10:18:02 +09:00
rewrite Make rewriter prevent auto-updates on views with conditional INSTEAD rules. 2020-01-14 09:51:28 +00:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Fix race condition in statext_store(). 2020-03-31 17:06:22 -04:00
storage Move check for fsync=off so that pendingOps still gets cleared. 2020-05-14 08:40:19 +03:00
tcop Re-implement the ereport() macro using __VA_ARGS__. 2020-03-24 11:48:33 -04:00
tsearch Further cleanup of ts_headline code. 2020-04-09 15:38:52 -04:00
utils Use query collation, not column's collation, while examining statistics. 2020-06-05 16:18:50 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
nls.mk Translation updates 2019-09-29 23:57:17 +02:00