pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
7+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:57  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ee79647769f54076422a18845f12e106a34c5f87

Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:58  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:58 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/286793b9889f8adaf76025debb7925a56a20b29c

Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:58  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:58 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2aedf25eb4d0a89c38dbbad8e5bbda237838292f

Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:58  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:58 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5630f39b31eac67a1bd56b0e6254d7724b7bbaeb

Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:58  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:58 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:59  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/87e504487740b4301781f0cd09000f70430ca830

Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Prevent BASE_BACKUP in the middle of another backup in the same
@ 2022-07-20 00:59  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2022-07-20 00:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dd831afc44bf77dd1fd8095d684153bbf5544e1c

Modified Files
--------------
src/backend/replication/basebackup.c | 6 ++++++
1 file changed, 6 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2022-07-20 00:59 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 00:57 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>
2022-07-20 00:58 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>
2022-07-20 00:58 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>
2022-07-20 00:58 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>
2022-07-20 00:58 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>
2022-07-20 00:59 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>
2022-07-20 00:59 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same Fujii Masao <fujii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox