postgresql/src/backend/access
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
..
brin BRIN revmap pages are not standard pages ... 2017-01-09 18:19:29 -03:00
common Fix ALTER TABLE / SET TYPE for irregular inheritance 2017-01-09 19:26:58 -03:00
gin Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
gist Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
hash Improve coding in _hash_addovflpage. 2017-01-10 08:31:03 -05:00
heap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
index Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nbtree Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rmgrdesc Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
spgist Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tablesample Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
transam Fix an assertion failure related to an exclusive backup. 2017-01-17 17:27:32 +09:00
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00