# max_wal_senders

> How many clients can stream WAL from this server at the same time.

Source: https://sqlly.app/sql-configuration/postgresql/max-wal-senders
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).

**Default**

`10`

**Range**

0 to 262143

**Restart needed**

Yes

**Default checked on**

PostgreSQL 18

## What it does

Each physical standby, pg_basebackup run and logical replication subscriber holds one sender process while it works, and wal_level = minimal requires this to be 0. A streaming client that disconnects abruptly can hold its sender slot until wal_sender_timeout (60s) expires.

## Default value

`10`. 10 (PostgreSQL 18), unchanged since PostgreSQL 10.

## Check the current value

```
SHOW max_wal_senders;

SELECT setting, unit, boot_val, context, source, pending_restart
FROM pg_settings
WHERE name = 'max_wal_senders';
```

## Change it

```
ALTER SYSTEM SET max_wal_senders = 20;
-- applies only after a server restart
```

Server restart required (pg_settings.context is postmaster). ALTER SYSTEM only stages the new value in postgresql.auto.conf.

## When to change it

Count one per concurrent standby plus one per base backup in flight, then add headroom for reconnects; the docs suggest setting it slightly above the expected client count for exactly that orphaned-slot reason.

## What can go wrong

Run out and a standby or pg_basebackup connect fails with 'number of requested standby connections exceeds max_wal_senders'. A value of 0 disables replication outright, and with wal_level = minimal the server refuses to start unless this is 0.

## Questions about max_wal_senders

### What is the default value of max_wal_senders in PostgreSQL?

10. 10 (PostgreSQL 18), unchanged since PostgreSQL 10.

### Does changing max_wal_senders require a restart?

Yes. Server restart required (pg_settings.context is postmaster). ALTER SYSTEM only stages the new value in postgresql.auto.conf.

### When should I change max_wal_senders?

Count one per concurrent standby plus one per base backup in flight, then add headroom for reconnects; the docs suggest setting it slightly above the expected client count for exactly that orphaned-slot reason.

Back to all [PostgreSQL settings](https://sqlly.app/sql-configuration/postgresql), or check the [PostgreSQL manual](https://www.postgresql.org/docs/current/runtime-config.html) for every option.

## Related PostgreSQL settings

- [`wal_level` How much information is written to the WAL.](https://sqlly.app/sql-configuration/postgresql/wal-level)
- [`max_slot_wal_keep_size` Most WAL a replication slot may hold back before it is invalidated; -1 is unlimited.](https://sqlly.app/sql-configuration/postgresql/max-slot-wal-keep-size)
- [`max_connections` Maximum number of concurrent client connections.](https://sqlly.app/sql-configuration/postgresql/max-connections)
