postgresql/src/backend
Fujii Masao 974ece58bb Fix an assertion failure related to an exclusive backup.
Previously multiple sessions could execute pg_start_backup() and
pg_stop_backup() to start and stop an exclusive backup at the same time.
This could trigger the assertion failure of
"FailedAssertion("!(XLogCtl->Insert.exclusiveBackup)".
This happend because, even while pg_start_backup() was starting
an exclusive backup, other session could run pg_stop_backup()
concurrently and mark the backup as not-in-progress unconditionally.

This patch introduces ExclusiveBackupState indicating the state of
an exclusive backup. This state is used to ensure that there is only
one session running pg_start_backup() or pg_stop_backup() at
the same time, to avoid the assertion failure.

Back-patch to all supported versions.

Author: Michael Paquier
Reviewed-By: Kyotaro Horiguchi and me
Reported-By: Andreas Seltenreich
Discussion: <87mvktojme.fsf@credativ.de>
2017-01-17 17:27:32 +09:00
..
access Fix an assertion failure related to an exclusive backup. 2017-01-17 17:27:32 +09:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
commands Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
executor Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
foreign Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
lib Fix overflow check in StringInfo; add missing casts 2017-01-10 11:41:13 -03:00
libpq Re-allow SSL passphrase prompt at server start, but not thereafter. 2017-01-04 12:44:03 -05:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
optimizer Fix matching of boolean index columns to sort ordering. 2017-01-15 14:09:35 -05:00
parser Fix check_srf_call_placement() to handle VALUES cases correctly. 2017-01-16 15:23:11 -05:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Re-allow SSL passphrase prompt at server start, but not thereafter. 2017-01-04 12:44:03 -05:00
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rewrite Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
snowball Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
storage Fix typos in comments. 2017-01-16 18:55:34 +09:00
tcop Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
tsearch Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
utils Fix NULL pointer dereference in tuplesort.c. 2017-01-16 13:53:40 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00