postgresql_16:6.14.2.3 Archive Callback
PostgreSQL 16 > Server Programming > Archive Modules > Archive Module Callbacks > Archive Callback
The archive_file_cb callback is called to archive a single WAL file. typedef bool (*ArchiveFileCB) (ArchiveModuleState *state, const char *file, const char *path); If true is returned, the server proceeds as if the file was successfully archived, which may include recycling or removing the original WAL file. If false is returned, the server will keep the original WAL file and retry archiving later. *file* will contain just the file name of the WAL file to archive, while *path* contains the full path of the WAL file (including the file name).