diff options
author | Fujii Masao <fujii@postgresql.org> | 2017-01-17 17:29:15 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2017-01-17 17:29:15 +0900 |
commit | 60a8b63d24321f5162dfcaf1502936c7ed00b63e (patch) | |
tree | 8196e6fb25b0d284d7a55ce44cd8efdf66096e34 /src/backend/utils/adt/timestamp.c | |
parent | 8a70d8ae7501141d283e56b31e10c66697c986d5 (diff) | |
download | postgresql-60a8b63d24321f5162dfcaf1502936c7ed00b63e.tar.gz postgresql-60a8b63d24321f5162dfcaf1502936c7ed00b63e.zip |
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>
Diffstat (limited to 'src/backend/utils/adt/timestamp.c')
0 files changed, 0 insertions, 0 deletions