From: Magnus Hagander <magnus@hagander.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Implement backup API functions for non-exclusive backups
Date: Tue, 05 Apr 2016 18:11:50 +0000
Message-ID: <E1anVSA-0002zm-Gc@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Implement backup API functions for non-exclusive backups
Previously non-exclusive backups had to be done using the replication protocol
and pg_basebackup. With this commit it's now possible to make them using
pg_start_backup/pg_stop_backup as well, as long as the backup program can
maintain a persistent connection to the database.
Doing this, backup_label and tablespace_map are returned as results from
pg_stop_backup() instead of being written to the data directory. This makes
the server safe from a crash during an ongoing backup, which can be a problem
with exclusive backups.
The old syntax of the functions remain and work exactly as before, but since the
new syntax is safer this should eventually be deprecated and removed.
Only reference documentation is included. The main section on backup still needs
to be rewritten to cover this, but since that is already scheduled for a separate
large rewrite, it's not included in this patch.
Reviewed by David Steele and Amit Kapila
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/7117685461af50f50c03f43e6a622284c8d54694
Modified Files
--------------
doc/src/sgml/func.sgml | 48 ++++++---
src/backend/access/transam/xlog.c | 55 +++++-----
src/backend/access/transam/xlogfuncs.c | 185 ++++++++++++++++++++++++++++++++-
src/backend/catalog/system_views.sql | 2 +-
src/backend/replication/basebackup.c | 17 +--
src/include/access/xlog.h | 4 +-
src/include/access/xlog_fn.h | 1 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 4 +-
9 files changed, 265 insertions(+), 53 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: magnus@hagander.net
Subject: Re: pgsql: Implement backup API functions for non-exclusive backups
In-Reply-To: <E1anVSA-0002zm-Gc@gemulon.postgresql.org>
References: <E1anVSA-0002zm-Gc@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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