]> granicus.if.org Git - postgresql/commit
Implement backup API functions for non-exclusive backups
authorMagnus Hagander <magnus@hagander.net>
Tue, 5 Apr 2016 18:03:49 +0000 (20:03 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 5 Apr 2016 18:03:49 +0000 (20:03 +0200)
commit7117685461af50f50c03f43e6a622284c8d54694
tree2e330c9d197d14afe26ecee0df128daf6980bf2a
parent9457b591b949d3c256dd91043df71fb11657227a
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
doc/src/sgml/func.sgml
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogfuncs.c
src/backend/catalog/system_views.sql
src/backend/replication/basebackup.c
src/include/access/xlog.h
src/include/access/xlog_fn.h
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h