From 5d2a47a2924240606ce1c57c98490fa41752ad41 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 19 Oct 2022 14:07:01 +0900 Subject: Rework shutdown callback of archiver modules As currently designed, with a callback registered in a ERROR_CLEANUP block, the shutdown callback would get called twice when updating archive_library on SIGHUP, which is something that we want to avoid to ease the life of extension writers. Anyway, an ERROR in the archiver process is treated as a FATAL, stopping it immediately, hence there is no need for a ERROR_CLEANUP block. Instead of that, the shutdown callback is not called upon before_shmem_exit(), giving to the modules the opportunity to do any cleanup actions before the server shuts down its subsystems. While on it, this commit adds some testing coverage for the shutdown callback. Neither shell_archive nor basic_archive have been using it, and one is added to shell_archive, whose trigger is checked in a TAP test through a shutdown sequence. Author: Nathan Bossart, Bharath Rupireddy Reviewed-by: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/20221015221328.GB1821022@nathanxps13 Backpatch-through: 15 --- doc/src/sgml/config.sgml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 099867dd1b7..703f6d5a7f4 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3618,8 +3618,9 @@ include_dir 'conf.d' The library to use for archiving completed WAL file segments. If set to an empty string (the default), archiving via shell is enabled, and is used. Otherwise, the specified - shared library is used for archiving. For more information, see - and + shared library is used for archiving. The WAL archiver process is + restarted by the postmaster when this parameter changes. For more + information, see and . -- cgit v1.2.3