pg_wal directory max size

Started by Yi Sunover 3 years ago3 messagesgeneral
Jump to latest
#1Yi Sun
yinan81@gmail.com

Hello guys,

We are planning the server disk space, pg_wal directory max size is wal
file size*wal_keep_segments? or is it also decided by other parameters
please? We tried to search for this, but could not find the answer

For example our postgresql is 9.6 below parameters value, is the pg_wal
directory max size 320*16MB please? Thank you
wal file size 16MB
wal_keep_segments = 320
min_wal_size = 1GB
max_wal_size = 2GB

Best Regards
Dennis

#2Andreas Kretschmer
andreas@a-kretschmer.de
In reply to: Yi Sun (#1)
Re: pg_wal directory max size

On 22 December 2022 04:00:57 CET, Yi Sun <yinan81@gmail.com> wrote:

Hello guys,

We are planning the server disk space, pg_wal directory max size is wal
file size*wal_keep_segments? or is it also decided by other parameters
please? We tried to search for this, but could not find the answer

For example our postgresql is 9.6 below parameters value, is the pg_wal
directory max size 320*16MB please? Thank you
wal file size 16MB
wal_keep_segments = 320
min_wal_size = 1GB
max_wal_size = 2GB

Best Regards
Dennis

No, you need space to store all wal's between 2 checkpoints. So it depends more on the checkpoint parameters and your workload. Plus wal_keep_segments...
9.6 is out of support.

Andreas

#3Andreas Kretschmer
andreas@a-kretschmer.de
In reply to: Yi Sun (#1)
Re: pg_wal directory max size

On 22 December 2022 04:00:57 CET, Yi Sun <yinan81@gmail.com> wrote:

Hello guys,

We are planning the server disk space, pg_wal directory max size is wal
file size*wal_keep_segments? or is it also decided by other parameters
please? We tried to search for this, but could not find the answer

For example our postgresql is 9.6 below parameters value, is the pg_wal
directory max size 320*16MB please? Thank you
wal file size 16MB
wal_keep_segments = 320
min_wal_size = 1GB
max_wal_size = 2GB

Best Regards
Dennis

No, you need space to store all wal's between 2 checkpoints. So it depends more on the checkpoint parameters and your workload. Plus wal_keep_segments...
9.6 is out of support.

Andreas