Explain low wal_sender_timeout - #6946
Merged
Merged
Conversation
freza
reviewed
Aug 20, 2025
| - `max_wal_senders` — Two needed for every peer node. | ||
| - `max_replication_slots` — Two needed for every peer node. | ||
| - `wal_sender_timeout` and `wal_receiver_timeout` — Determines how | ||
| - `wal_sender_timeout` and `wal_receiver_timeout` — The default of one minute is usually sufficient, but large transactions may require longer than this amount of time to process. Since the wal sender must process the full size of the transaction before transmitting it to a waiting replication connection, Postgres can see that as a timeout. If the problem is actually due to a large transaction, raising wal_sender_timeout to a higher value, like 3600 seconds or higher, and reloading the server could solve the problem. Additionally, this setting determines how |
There was a problem hiding this comment.
Would capitalize "WAL". Would be good to give an example of how to change these values on a running node:
ALTER SYSTEM RESET wal_sender_timeout;
ALTER SYSTEM RESET wal_receiver_timeout;
SELECT pg_reload_conf();
But not sure if this is the right place for it -- up to you.
There was a problem hiding this comment.
(To change them persistently I guess you have to change postgres.conf, but commands for change at runtime are a handy trick.)
There was a problem hiding this comment.
(Also I'd say '1h' or '3600s' to stick with actual config syntax, just to avoid confusion.)
Contributor
Author
There was a problem hiding this comment.
Fixed the capitalization and the value, thank you!
freza
approved these changes
Aug 20, 2025
nidhibhammar
approved these changes
Aug 21, 2025
PJMODOS
reviewed
Aug 21, 2025
| - `max_wal_senders` — Two needed for every peer node. | ||
| - `max_replication_slots` — Two needed for every peer node. | ||
| - `wal_sender_timeout` and `wal_receiver_timeout` — Determines how | ||
| - `wal_sender_timeout` and `wal_receiver_timeout` — The default of one minute is usually sufficient, but large transactions may require longer than this amount of time to process. Since the WAL sender must process the full size of the transaction before transmitting it to a waiting replication connection, Postgres can see that as a timeout. If the problem is actually due to a large transaction, raising wal_sender_timeout to a higher value, like `3600s` or higher, and reloading the server could solve the problem. Additionally, this setting determines how |
Contributor
There was a problem hiding this comment.
We should mention that we always use keepalive to handle networking problems regardless of wal_sender_timeout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.