[COMMITTERS] pgsql: Fix an assertion failure related to an exclusive backup. - Mailing list pgsql-committers

From Fujii Masao
Subject [COMMITTERS] pgsql: Fix an assertion failure related to an exclusive backup.
Date
Msg-id E1cTPJu-0008D2-MG@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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>

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/dfe348c1b1ca5327cf2ff058b795ac188d442715

Modified Files
--------------
src/backend/access/transam/xlog.c | 223 ++++++++++++++++++++++++++------------
1 file changed, 155 insertions(+), 68 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Fix check_srf_call_placement() to handle VALUES casescorrectly.
Next
From: Magnus Hagander
Date:
Subject: [COMMITTERS] pgsql: Add compression support to pg_receivexlog