RefLib

Reference library for AI

Back

postgresql_16:4.5.5.4 Recovery

PostgreSQL 16 > Server Administration > Server Configuration > Write Ahead Log > Recovery

This section describes the settings that apply to recovery in general, affecting crash recovery, streaming replication and archive-based replication.

recovery_prefetch (enum)

Whether to try to prefetch blocks that are referenced in the WAL that are not yet in the buffer pool, during recovery. Valid values are off, on and try (the default). The setting try enables prefetching only if the operating system provides the posix_fadvise function, which is currently used to implement prefetching. Note that some operating systems provide the function, but it doesn't do anything.

Prefetching blocks that will soon be needed can reduce I/O wait times during recovery with some workloads. See also the (see guc-wal-decode-buffer-size) and (see guc-maintenance-io-concurrency) settings, which limit prefetching activity.

wal_decode_buffer_size (integer)

A limit on how far ahead the server can look in the WAL, to find blocks to prefetch. If this value is specified without units, it is taken as bytes. The default is 512kB. This parameter can only be set at server start.

Back