ignore_invalid_pages

A configuration parameter determining whether to ignore WAL records referencing invalid pages during recovery

ignore_invalid_pages is a configuration parameter determining whether to ignore WAL records referencing invalid pages during recovery or standby mode.

ignore_invalid_pages was added in PostgreSQL 13 (commit 41c184bc)

Purpose

Normally, detection of WAL records with references to invalid pages during recovery will cause PostgreSQL to abort recovery with a PANIC error.

Setting ignore_invalid_pages to on will cause PostgreSQL to ignore these invalid pages and continue with recovery. While this will still most likely leave the database in a bad state (with attendant risk of crashes. data loss and/or further data corruption), it will enable PostgreSQL to start up so that further actions such as data recovery can be carried out.

Default

Default value for ignore_invalid_pages is: off.

Applying changes

Changes to ignore_invalid_pages can only be applied by restarting PostgreSQL.

Details

PostgreSQL 13

postgres=# SELECT * FROM pg_settings WHERE name='ignore_invalid_pages';
-[ RECORD 1 ]---+-------------------------------------------------------------------------
name | ignore_invalid_pages setting | off unit | category | Developer Options short_desc | Continues recovery after an invalid pages failure. extra_desc | Detection of WAL records having references to invalid pages during | recovery causes PostgreSQL to raise a PANIC-level error, aborting the | recovery. Setting ignore_invalid_pages to true causes the system to | ignore invalid page references in WAL records (but still report a | warning), and continue recovery. This behavior may cause crashes, data | loss, propagate or hide corruption, or other serious problems. Only | has an effect during recovery or in standby mode. context | postmaster vartype | bool source | default min_val | max_val | enumvals | boot_val | off reset_val | off sourcefile | sourceline | pending_restart | f

Categories

Dangerous thing, Data consistency and forensics, GUC configuration item, WAL

See also

ignore_checksum_failure, ignore_system_indexes