Configuration parameter

recovery_target_name — PostgreSQL configuration parameter

Category Write Ahead Log

This parameter specifies the named restore point (created with pg_create_restore_point()) to which recovery will proceed.

At a glance

Property Value
Parameter recovery_target_name
Category Write Ahead Log
Default (see documentation)
Value type string
Change scope Per-session (SET)
Available in PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12)

What it does

This parameter specifies the named restore point (created with pg_create_restore_point()) to which recovery will proceed.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

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

Tuning guidance

This is a point-in-time-recovery control, used only while restoring a backup, not during normal operation. Set it in the recovery configuration to define the exact stopping point or restore action you want, perform the recovery, then remove it. It has no effect on a normally running primary.

Reference

PostgreSQL documentation — recovery_target_name.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters