archive_mode
Requires a restarttuned by pgconfiguratorenum: off / on / always
Turns on WAL archiving — the basis for point-in-time recovery and some backups.
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
When archive_mode is on, completed WAL segments are handed to your archive_command (or archive_library) to be copied somewhere durable. Those archived segments plus a base backup let you restore to any moment — point-in-time recovery (PITR). 'always' also archives while in standby/recovery.
How to tune it
Enable it if you do PITR or use a backup tool (pgBackRest, WAL-G, barman) that relies on WAL archiving. It needs a working archive_command and a restart to switch on. If you only do plain dumps and have no PITR requirement, you may not need it.
FAQ
- Do I need archive_mode for replication?
- Not for ordinary streaming replication (that uses WAL senders / slots). You need it for point-in-time recovery and for backup tools that restore via archived WAL. Many setups run both.