On Tue, 2022-08-30 at 08:29 +0000, James Pang (chaolpan) wrote: > We want keep more wal to give more room for data replication, in case of some delay , > and need old wal data. So wan to set wal_keep_size , and want to increase > max_wal-size a lot to make max_wal_size > wal_keep_size (it may > 1TB). The two parameters are independent: - "max_wal_size" does *not* determine the maximum WAL size, but how much WAL can be produced before the next checkpoint is triggered. - "wal_keep_size" determines how much old WAL is kept around. Set "wal_keep_size" and leave "max_wal_size" unchanged. Or even better, use a replication slot. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com