Sample Header Ad - 728x90

Why does PostgreSQL want max_wal_senders equal to 0 and greater than 0 at the same time?

2 votes
1 answer
1163 views
We're running a backup process based on pg_basebackup of a Postgres 14.5 database that creates a lot of WAL archive files and using up huge amounts of disk space. As we don't really need the WAL archive, I thought to disable WAL archiving and I changed these values (everything else is pure default): archive_mode = off # was 'on' before wal_level = minimal # was 'replica' before (there's only a single db instance running) max_wal_senders = 0 # was '10' before (but wal_level = minimal seems to require '0') Maybe there's no real need to lower the wal_level from replica to minimal, but the [WAL documentation](https://www.postgresql.org/docs/current/runtime-config-wal.html) states what seems exactly sufficient for my less than critical database: > minimal removes all logging except the information required to recover from a crash or immediate shutdown. Unfortunately, after the above configuration, the backup process now fails with this error: FATAL: number of requested standby connections exceeds max_wal_senders (currently 0) In other words, max_wal_senders must be zero and also greater than zero at the same time! What can I do to get out of this deadlock?
Asked by dokaspar (123 rep)
Sep 18, 2023, 06:28 PM
Last activity: Sep 18, 2023, 07:13 PM