pgsql: Remove exclusive backup mode

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove exclusive backup mode
Date: 2022-04-06 18:43:56
Message-ID: E1ncAdH-000cIM-Fj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove exclusive backup mode

Exclusive-mode backups have been deprecated since 9.6 (when
non-exclusive backups were introduced) due to the issues
they can cause should the system crash while one is running and
generally because non-exclusive provides a much better interface.
Further, exclusive backup mode wasn't really being tested (nor was most
of the related code- like being able to log in just to stop an exclusive
backup and the bits of the state machine related to that) and having to
possibly deal with an exclusive backup and the backup_label file
existing during pg_basebackup, pg_rewind, etc, added other complexities
that we are better off without.

This patch removes the exclusive backup mode, the various special cases
for dealing with it, and greatly simplifies the online backup code and
documentation.

Authors: David Steele, Nathan Bossart
Reviewed-by: Chapman Flack
Discussion: https://postgr.es/m/ac7339ca-3718-3c93-929f-99e725d1172c@pgmasters.net
https://postgr.es/m/CAHg+QDfiM+WU61tF6=nPZocMZvHDzCK47Kneyb0ZRULYzV5sKQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39969e2a1e4d7f5a37f3ef37d53bbfe171e7d77a

Modified Files
--------------
doc/src/sgml/backup.sgml | 241 ++--------
doc/src/sgml/func.sgml | 111 +----
doc/src/sgml/high-availability.sgml | 6 +-
doc/src/sgml/monitoring.sgml | 4 +-
doc/src/sgml/ref/pg_ctl-ref.sgml | 6 +-
doc/src/sgml/ref/pgupgrade.sgml | 2 +-
doc/src/sgml/runtime.sgml | 8 +-
src/backend/access/transam/xlog.c | 519 +++------------------
src/backend/access/transam/xlogfuncs.c | 253 ++--------
src/backend/access/transam/xlogrecovery.c | 20 +-
src/backend/catalog/system_functions.sql | 18 +-
src/backend/postmaster/postmaster.c | 75 +--
src/backend/replication/basebackup.c | 20 +-
src/backend/utils/init/postinit.c | 18 -
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 4 +
src/bin/pg_ctl/pg_ctl.c | 30 --
src/bin/pg_rewind/filemap.c | 6 +-
src/include/access/xlog.h | 7 +-
src/include/catalog/pg_control.h | 4 +-
src/include/catalog/pg_proc.dat | 28 +-
src/include/libpq/libpq-be.h | 3 +-
src/include/miscadmin.h | 4 -
src/test/perl/PostgreSQL/Test/Cluster.pm | 56 +--
.../recovery/t/010_logical_decoding_timelines.pl | 4 +-
24 files changed, 247 insertions(+), 1200 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2022-04-06 18:56:36 Re: pgsql: Remove exclusive backup mode
Previous Message Andrew Dunstan 2022-04-06 17:54:49 pgsql: Further improve jsonb_sqljson parallel test