Postgres 14 WAL FILE cannot change min wal size(in WAL DIRECTORY) after changing propperties min_wal_size max_wal_size
1
vote
1
answer
464
views
I'm completely new in Postgres optimization. I was reading a lot about checkpoint and WAL files. I found a query to examine the ratio of checkpoints time to requested (exceeded WAL max size)
SELECT checkpoints_timed, checkpoints_req
FROM pg_stat_bgwriter;
|checkpoints_timed | checkpoints_req |
|-|-|
|20496|53|
In order to minimalize requested checkpoint I changed postgres configuration to:
checkpoint_timeout = 15min
max_wal_size = 2GB
min_wal_size = 200MB
But when I check WAL dir space is still 83MB (as the default value from configuration).
select sum(size)
from pg_ls_waldir();
Can anyone explain why WAL directory size is still ~83MB and not increasing to 200MB?
I noted that changing parameters has triggered 2 checkpoints_req so I guess that max_wal_size is still 1GB?
Asked by BARTOSZ BALA
(11 rep)
Apr 28, 2023, 10:08 PM
Last activity: May 1, 2023, 10:37 AM
Last activity: May 1, 2023, 10:37 AM