1/*-------------------------------------------------------------------------
4 * Exports for archive modules.
6 * Copyright (c) 2022-2025, PostgreSQL Global Development Group
8 * src/include/archive/archive_module.h
10 *-------------------------------------------------------------------------
12#ifndef _ARCHIVE_MODULE_H
13#define _ARCHIVE_MODULE_H
16 * The value of the archive_library GUC.
23 * Private data pointer for use by an archive module. This can be used to
24 * store state for the module that will be passed to each of its
31 * Archive module callbacks
33 * These callback functions should be defined by archive libraries and returned
34 * via _PG_archive_module_init(). ArchiveFileCB is the only required callback.
35 * For more information about the purpose of each callback, refer to the
36 * archive modules documentation.
52 * Type of the shared library symbol _PG_archive_module_init that is looked
53 * up when loading an archive library.
59/* Support for messages reported from archive module callbacks. */
63 #define arch_module_check_errdetail \
64 pre_format_elog_string(errno, TEXTDOMAIN), \
65 arch_module_check_errdetail_string = format_elog_string
67#endif /* _ARCHIVE_MODULE_H */
struct ArchiveModuleState ArchiveModuleState
bool(* ArchiveFileCB)(ArchiveModuleState *state, const char *file, const char *path)
PGDLLIMPORT char * XLogArchiveLibrary
bool(* ArchiveCheckConfiguredCB)(ArchiveModuleState *state)
struct ArchiveModuleCallbacks ArchiveModuleCallbacks
void(* ArchiveShutdownCB)(ArchiveModuleState *state)
PGDLLEXPORT const ArchiveModuleCallbacks * _PG_archive_module_init(void)
void(* ArchiveStartupCB)(ArchiveModuleState *state)
PGDLLIMPORT char * arch_module_check_errdetail_string
ArchiveFileCB archive_file_cb
ArchiveShutdownCB shutdown_cb
ArchiveCheckConfiguredCB check_configured_cb
ArchiveStartupCB startup_cb