Thread: [NOVICE] max_wal_size & compression on compressed filesystem

[NOVICE] max_wal_size & compression on compressed filesystem

From
Stephen Froehlich
Date:

Hi All,

 

I am running postgres on top of zfs with lz4 enabled, so of course wal compression is off.  I know that the wal size is then set for the uncompressed size as postgres is completely unaware of zfs’s compression happening under the hood.

 

So, to get the WAL size “right” given my space constraints (a fast ~250 GB partition on an SSD), I either need to multiply max_wal_size by my expected compression ratio (looks like about 4:1) or turn wal_compression on (which assume would result in a small speed hit).

 

Thoughts?

 

 

Stephen Froehlich
Sr. Strategist, CableLabs®


s.froehlich@cablelabs.com

Tel: +1 (303) 661-3708