I'm configuring a CloudNativePG PostgreSQL operator in kubernetes. The data there is not very important and it is ok if we loose it. I want to disable WAL archiving because the archive files in the pg_wal
folder keep growing and exceed memory limit.
However, it's not possible to disable archive_mode
in this kubernetes operator, cf https://cloudnative-pg.io/documentation/current/postgresql_conf/. Why? And how do I stop the pg_wal
folder from growing in memory?
I tried tweaking the wal_keep_size
parameter, cf https://cloudnative-pg.io/documentation/current/postgresql_conf/, but it didn't change anything
Update
This PR introduces support for disabling WAL archiving. From CloudNativePG 1.22.2 it will be readily available.
At the time, this was not possible. The reason behind it is purely historical. Primarily, the goal was to ship a solution that, by default, would reduce the risk of going to production without a backup. Also, at that time we did not have replication slots, and the risk of replicas falling out of sync was quite high.
Now that CloudNativePG adoption keeps increasing, we are going to enable configuration of both archive mode and WAL level. See: