postgresql/src/tools
Michael Paquier 35739b87dc Redesign archive modules
A new callback named startup_cb, called shortly after a module is
loaded, is added.  This makes possible the initialization of any
additional state data required by a module.  This initial state data can
be saved in a ArchiveModuleState, that is now passed down to all the
callbacks that can be defined in a module.  With this design, it is
possible to have a per-module state, aimed at opening the door to the
support of more than one archive module.

The initialization of the callbacks is changed so as
_PG_archive_module_init() does not anymore give in input a
ArchiveModuleCallbacks that a module has to fill in with callback
definitions.  Instead, a module now needs to return a const
ArchiveModuleCallbacks.

All the structure and callback definitions of archive modules are moved
into their own header, named archive_module.h, from pgarch.h.
Command-based archiving follows the same line, with a new set of files
named shell_archive.{c,h}.

There are a few more items that are under discussion to improve the
design of archive modules, like the fact that basic_archive calls
sigsetjmp() by itself to define its own error handling flow.  These will
be adjusted later, the changes done here cover already a good portion
of what has been discussed.

Any modules created for v15 will need to be adjusted to this new
design.

Author: Nathan Bossart
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/20230130194810.6fztfgbn32e7qarj@awork3.anarazel.de
2023-02-17 14:26:42 +09:00
..
ci ci: Add task testing windows with mingw 2022-11-17 16:22:25 -08:00
editors Make Emacs perl-mode indent more like perltidy. 2019-01-13 11:32:31 -08:00
ifaddrs Update copyright for 2023 2023-01-02 15:00:37 -05:00
msvc Remove obsolete platforms from ps_status.c. 2023-02-17 15:18:18 +13:00
perlcheck doc: update metacpan.org links to avoid redirects 2022-11-16 10:24:37 +01:00
pg_bsd_indent Make pg_bsd_indent's .h files inclusion-order-safe. 2023-02-12 13:06:37 -05:00
pginclude Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgindent Redesign archive modules 2023-02-17 14:26:42 +09:00
PerfectHash.pm Update copyright for 2023 2023-01-02 15:00:37 -05:00
RELEASE_CHANGES Add defenses against unexpected changes in the NodeTag enum list. 2022-07-12 11:22:52 -04:00
ccsym tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
check_bison_recursion.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
codelines
copyright.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
darwin_sysroot Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
find_badmacros
find_meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
find_static Fix `trap` in a few shell scripts 2022-09-20 18:50:16 +02:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
gen_export.pl meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
gen_keywordlist.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
git-external-diff Preserve information on use of git-external-diff 2018-05-24 23:45:31 +09:30
git_changelog Update copyright for 2023 2023-01-02 15:00:37 -05:00
make_ctags Fix make_etags failure on Mac. 2023-02-15 09:52:42 +09:00
make_etags Fix make_etags failure on Mac. 2023-02-15 09:52:42 +09:00
make_mkid
mark_pgdllimport.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgflex meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pgtest Fix `trap` in a few shell scripts 2022-09-20 18:50:16 +02:00
rcgen meson: Add windows resource files 2022-10-05 09:56:05 -07:00
testint128.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
testwrap meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
valgrind.supp Record dependencies of a cast on other casts that it requires. 2022-10-17 14:02:05 -04:00
version_stamp.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
win32tzlist.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00