Skip to content

Commit 113c4ab

Browse files
committed
fix: lower default max_slot_wal_keep_size from 4096MB to 512MB
The 4096MB default exceeds the total disk size of free tier projects (2GB), risking disk exhaustion from a lagging or disconnected slot. 512MB fits safely within free tier disk overhead while still providing a reasonable buffer for logical replication slots (e.g. Realtime, CDC). WAL archiving to S3 means local retention is not needed for recovery.
1 parent d488045 commit 113c4ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ansible/files/postgresql_config/postgresql.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ max_wal_senders = 10 # max number of walsender processes
299299
max_replication_slots = 5 # max number of replication slots
300300
# (change requires restart)
301301
#wal_keep_size = 0 # in megabytes; 0 disables
302-
max_slot_wal_keep_size = 4096 # in megabytes; -1 disables
302+
max_slot_wal_keep_size = 512 # in megabytes; -1 disables
303303
#wal_sender_timeout = 60s # in milliseconds; 0 disables
304304
#track_commit_timestamp = off # collect timestamp of transaction commit
305305
# (change requires restart)

0 commit comments

Comments
 (0)