postgresql/src
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
..
backend Fix an assertion failure related to an exclusive backup. 2017-01-17 17:27:32 +09:00
bin Fix incorrect comparison due to bad merge 2017-01-16 18:20:57 +01:00
common Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
fe_utils Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
include Fix check_srf_call_placement() to handle VALUES cases correctly. 2017-01-16 15:23:11 -05:00
interfaces Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
makefiles Provide NO_INSTALLCHECK option for pgxs. 2016-11-14 14:53:07 -08:00
pl Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
port Attempt to handle pending-delete files on Windows 2017-01-04 10:48:30 +01:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Fix check_srf_call_placement() to handle VALUES cases correctly. 2017-01-16 15:23:11 -05:00
timezone Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tools pg_ctl: Change default to wait for all actions 2017-01-14 09:15:08 -05:00
tutorial Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
.gitignore
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
Makefile.shlib Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00