From 293913568e6a7a86fd1479e1cff8e2ecb58d6568 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 15:44:03 +0200 Subject: Adding upstream version 16.2. Signed-off-by: Daniel Baumann --- doc/src/sgml/html/archive-module-init.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/src/sgml/html/archive-module-init.html (limited to 'doc/src/sgml/html/archive-module-init.html') diff --git a/doc/src/sgml/html/archive-module-init.html b/doc/src/sgml/html/archive-module-init.html new file mode 100644 index 0000000..01972b4 --- /dev/null +++ b/doc/src/sgml/html/archive-module-init.html @@ -0,0 +1,28 @@ + +51.1. Initialization Functions

51.1. Initialization Functions #

+ An archive library is loaded by dynamically loading a shared library with the + archive_library's name as the library base name. The + normal library search path is used to locate the library. To provide the + required archive module callbacks and to indicate that the library is + actually an archive module, it needs to provide a function named + _PG_archive_module_init. The result of the function + must be a pointer to a struct of type + ArchiveModuleCallbacks, which contains everything + that the core code needs to know to make use of the archive module. The + return value needs to be of server lifetime, which is typically achieved by + defining it as a static const variable in global scope. + +

+typedef struct ArchiveModuleCallbacks
+{
+    ArchiveStartupCB startup_cb;
+    ArchiveCheckConfiguredCB check_configured_cb;
+    ArchiveFileCB archive_file_cb;
+    ArchiveShutdownCB shutdown_cb;
+} ArchiveModuleCallbacks;
+typedef const ArchiveModuleCallbacks *(*ArchiveModuleInit) (void);
+

+ + Only the archive_file_cb callback is required. The + others are optional. +

\ No newline at end of file -- cgit v1.2.3