Sheikh Wasiu Al Hasib
Sheikh Wasiu Al Hasib

Reputation: 550

How can I change my postgresql WAL file size?

How can I change my PostgreSQL WAL file size as my wish. By default at pg_wal directory postgres generate 16MB WAL files. I try to change using max_wal_size, min_wal_size parameter. But I think it is not right parameter to change. Necessary details given in the below screenshot.

enter image description here

Upvotes: 0

Views: 2448

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246083

With an old and outdated version like 9.4, your only option is to build PostgreSQL from source and configure it with

./configure --with-wal-segsize=1024

Then you have to dump and restore the cluster to that new installation.

With current versions. You could simply shut down PostgreSQL cleanly (important!) and run pg_resetwal with the appropriate option.

Upgrade!

Upvotes: 1

Related Questions