postgresql/contrib
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
..
adminpack Update copyright for 2023 2023-01-02 15:00:37 -05:00
amcheck Add tests for pg_stat_io 2023-02-11 10:05:04 -08:00
auth_delay Update copyright for 2023 2023-01-02 15:00:37 -05:00
auto_explain Make auto_explain print the query identifier in verbose mode 2023-01-26 12:23:16 +09:00
basebackup_to_shell Common function for percent placeholder replacement 2023-01-11 10:42:35 +01:00
basic_archive Redesign archive modules 2023-02-17 14:26:42 +09:00
bloom Update copyright for 2023 2023-01-02 15:00:37 -05:00
bool_plperl Update copyright for 2023 2023-01-02 15:00:37 -05:00
btree_gin Update copyright for 2023 2023-01-02 15:00:37 -05:00
btree_gist Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
citext Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
cube New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
dblink dblink: Fix variable confusion introduced in e4602483e9 2023-01-31 17:47:53 -08:00
dict_int Update copyright for 2023 2023-01-02 15:00:37 -05:00
dict_xsyn Update copyright for 2023 2023-01-02 15:00:37 -05:00
earthdistance Doc: improve commentary about providing our own definitions of M_PI. 2023-01-08 16:25:33 -05:00
file_fdw Update copyright for 2023 2023-01-02 15:00:37 -05:00
fuzzystrmatch New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
hstore Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
hstore_plperl Update copyright for 2023 2023-01-02 15:00:37 -05:00
hstore_plpython Update copyright for 2023 2023-01-02 15:00:37 -05:00
intagg Update copyright for 2023 2023-01-02 15:00:37 -05:00
intarray Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
isn Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb_plperl Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb_plpython Update copyright for 2023 2023-01-02 15:00:37 -05:00
lo Update copyright for 2023 2023-01-02 15:00:37 -05:00
ltree Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
ltree_plpython Update copyright for 2023 2023-01-02 15:00:37 -05:00
oid2name Update copyright for 2023 2023-01-02 15:00:37 -05:00
old_snapshot Update copyright for 2023 2023-01-02 15:00:37 -05:00
pageinspect Consolidate ItemPointer to Datum conversion functions 2023-02-13 09:57:15 +01:00
passwordcheck Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_buffercache Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_freespacemap Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_prewarm Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_stat_statements Include values of A_Const nodes in query jumbling 2023-02-07 09:03:54 +09:00
pg_surgery Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
pg_trgm Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
pg_visibility Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_walinspect pg_walinspect: Add pg_get_wal_fpi_info() 2023-01-23 13:55:18 +09:00
pgcrypto New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
pgrowlocks Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgstattuple Update copyright for 2023 2023-01-02 15:00:37 -05:00
postgres_fdw Fix various typos in code and tests 2023-02-09 14:43:53 +09:00
seg Update copyright for 2023 2023-01-02 15:00:37 -05:00
sepgsql Update copyright for 2023 2023-01-02 15:00:37 -05:00
spi Update copyright for 2023 2023-01-02 15:00:37 -05:00
sslinfo Update copyright for 2023 2023-01-02 15:00:37 -05:00
start-scripts Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
tablefunc Update copyright for 2023 2023-01-02 15:00:37 -05:00
tcn Update copyright for 2023 2023-01-02 15:00:37 -05:00
test_decoding Remove uses of AssertVariableIsOfType() obsoleted by f2b73c8 2023-02-08 21:06:46 -08:00
tsm_system_rows Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsm_system_time Update copyright for 2023 2023-01-02 15:00:37 -05:00
unaccent Update copyright for 2023 2023-01-02 15:00:37 -05:00
uuid-ossp New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
vacuumlo Update copyright for 2023 2023-01-02 15:00:37 -05:00
xml2 Update copyright for 2023 2023-01-02 15:00:37 -05:00
Makefile Revert "Rename contrib module basic_archive to basic_wal_module" 2023-01-26 09:13:39 +09:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
meson.build Revert "Rename contrib module basic_archive to basic_wal_module" 2023-01-26 09:13:39 +09:00

README

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.