From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow archiving via loadable modules.
Date: Thu, 03 Feb 2022 19:08:37 +0000
Message-ID: <E1nFhTB-0006Ib-DD@gemulon.postgresql.org> (raw)
Allow archiving via loadable modules.
Running a shell command for each file to be archived has a lot of
overhead and may not offer as much error checking as you want, or the
exact semantics that you want. So, offer the option to call a loadable
module for each file to be archived, rather than running a shell command.
Also, add a 'basic_archive' contrib module as an example implementation
that archives to a local directory.
Nathan Bossart, with a little bit of kibitzing by me.
Discussion: http://postgr.es/m/20220202224433.GA1036711@nathanxps13
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5ef1eefd76f404ddc59b885d50340e602b70f05f
Modified Files
--------------
contrib/Makefile | 1 +
contrib/basic_archive/.gitignore | 4 +
contrib/basic_archive/Makefile | 20 ++
contrib/basic_archive/basic_archive.c | 371 +++++++++++++++++++++++
contrib/basic_archive/basic_archive.conf | 3 +
contrib/basic_archive/expected/basic_archive.out | 29 ++
contrib/basic_archive/sql/basic_archive.sql | 22 ++
doc/src/sgml/archive-modules.sgml | 136 +++++++++
doc/src/sgml/backup.sgml | 85 ++++--
doc/src/sgml/basic-archive.sgml | 81 +++++
doc/src/sgml/config.sgml | 37 ++-
doc/src/sgml/contrib.sgml | 1 +
doc/src/sgml/filelist.sgml | 2 +
doc/src/sgml/high-availability.sgml | 6 +-
doc/src/sgml/postgres.sgml | 1 +
doc/src/sgml/ref/pg_basebackup.sgml | 4 +-
doc/src/sgml/ref/pg_receivewal.sgml | 6 +-
doc/src/sgml/wal.sgml | 2 +-
src/backend/access/transam/xlog.c | 2 +-
src/backend/postmaster/pgarch.c | 110 ++++++-
src/backend/postmaster/shell_archive.c | 24 +-
src/backend/utils/init/miscinit.c | 1 +
src/backend/utils/misc/guc.c | 12 +-
src/backend/utils/misc/postgresql.conf.sample | 3 +
src/include/access/xlog.h | 1 -
src/include/postmaster/pgarch.h | 38 ++-
26 files changed, 938 insertions(+), 64 deletions(-)
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: rhaas@postgresql.org
Subject: Re: pgsql: Allow archiving via loadable modules.
In-Reply-To: <E1nFhTB-0006Ib-DD@gemulon.postgresql.org>
References: <E1nFhTB-0006Ib-DD@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