The local shell command to execute to archive a completed WAL file segment. Any
%p in the string is replaced by the path name of the file to archive, and any
%f is replaced by only the file name. (The path name is relative to the working directory of the server, i.e., the cluster's data directory.) Use
%% to embed an actual
% character in the command. It is important for the command to return a zero exit status only if it succeeds. For more information see backup-archiving-wal.
This parameter can only be set in the postgresql.conf file or on the server command line. It is ignored unless archive_mode was enabled at server start and archive_library is set to an empty string. If
archive_command is an empty string (the default) while archive_mode is enabled (and archive_library is set to an empty string), WAL archiving is temporarily disabled, but the server continues to accumulate WAL segment files in the expectation that a command will soon be provided. Setting
archive_command to a command that does nothing but return true, e.g.,
REM on Windows), effectively disables archiving, but also breaks the chain of WAL files needed for archive recovery, so it should only be used in unusual circumstances.
- Re: Hardening PostgreSQL via (optional) ban on local file system access
- Re: Configuration Parameter/GUC value validation hook
- Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary)
- Re: PATCH: add "--config-file=" option to pg_rewind
- Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.)