Configuration parameter

archive_command — PostgreSQL Configuration Parameter

Category Archiving Default '' Unit boolean / enum / numeric Change scope Reload (no restart)

Shell command to archive a completed WAL file.

At a glance

Property Value
Parameter archive_command
Category Archiving
Default ''
Value type boolean / enum / numeric
Change scope Reload (no restart)

What it does

The command executed to archive each completed WAL segment. It must return 0 only on success and must not overwrite existing files.

How to apply a change

Takes effect on configuration reload (sighup context). Run SELECT pg_reload_conf(); or send SIGHUP — no restart needed.

Inspect the current value and source with SHOW archive_command; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'archive_command';.

Tuning guidance

Use a tested tool (pgBackRest, WAL-G, barman) rather than a hand-rolled cp. PostgreSQL retries failed segments forever and stops removing WAL until archiving succeeds.

Reference

PostgreSQL documentation — Archiving configuration.

Was this helpful?

← All configuration parameters