RecoveryRetrieveRetryInterval

wait event occurs on a standby (replica) server when the system is in recovery mode and has failed to retrieve new Write-Ahead Log (WAL) data from all available sources (Archive, pg_wal, or Streaming Replication).
Instead of constantly hammering the CPU or the network to check for new files, the standby enters a "sleep" state for a specific duration before trying again.
So this is waiting before retrying to fetch WAL (Write-Ahead Log) data that is not yet available.

What causes it?

Parameters

wal_retrieve_retry_interval (default: 5 seconds) - This parameter defines the duration the standby will wait before retrying to fetch WAL data after a failed attempt. It can be adjusted based on the expected latency and network conditions.