Parameter · Write-Ahead Log / Recovery Target
recovery_target_name
Sets the named restore point up to which recovery will proceed.
- Default:
'' (empty) - Type: string
- Applies: Restart required
In plain words
Before a risky change you can drop a named bookmark into the WAL: SELECT pg_create_restore_point('pre_cleanup');. If things go wrong, restore the backup and set recovery_target_name = 'pre_cleanup' to stop exactly there.
For DBAs and operators
The restore point is a WAL record; replay stops when it reaches the first restore point with that name (names are not unique, so make them so). recovery_target_inclusive does not apply. Requires wal_level replica or higher and superuser (or EXECUTE granted) to create.
LOG: recovery stopping at restore point "pre_cleanup", time 2026-10-22 14:03:00+00
Good practice for deployments and migrations: create a restore point, and archive it promptly (pg_switch_wal() if archive_timeout is long).
How to change it
Change in postgresql.conf or ALTER SYSTEM, then restart the server.