From: | Fujii Masao <fujii(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Prevent BASE_BACKUP in the middle of another backup in the same |
Date: | 2022-07-20 00:58:50 |
Message-ID: | E1oDy37-000Lvt-JC@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Prevent BASE_BACKUP in the middle of another backup in the same session.
Multiple non-exclusive backups are able to be run conrrently in different
sessions. But, in the same session, only one non-exclusive backup can be
run at the same moment. If pg_backup_start (pg_start_backup in v14 or before)
is called in the middle of another non-exclusive backup in the same session,
an error is thrown.
However, previously, in logical replication walsender mode, even if that
walsender session had already called pg_backup_start and started
a non-exclusive backup, it could execute BASE_BACKUP command and
start another non-exclusive backup. Which caused subsequent pg_backup_stop
to throw an error because BASE_BACKUP unexpectedly reset the session state
marked by pg_backup_start.
This commit prevents BASE_BACKUP command in the middle of another
non-exclusive backup in the same session.
Back-patch to all supported branches.
Author: Fujii Masao
Reviewed-by: Kyotaro Horiguchi, Masahiko Sawada, Michael Paquier, Robert Haas
Discussion: https://postgr.es/m/3374718f-9fbf-a950-6d66-d973e027f44c@oss.nttdata.com
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9fa00e312b3174b7ec0e3767b13fba2967bc9d24
Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2022-07-20 00:59:04 | pgsql: Fix assertion failure and segmentation fault in backup code. |
Previous Message | Fujii Masao | 2022-07-20 00:58:37 | pgsql: Fix assertion failure and segmentation fault in backup code. |