I think what’s happening here is that you’re using the Stolon-based Postgres image (14.x without -flex in the name). I wasn’t able to check this conclusively because I don’t know which app this is referring to.
If the above is true, Stolon is managing all the files and will overwrite them if you don’t do the config in a way that Stolon is aware of and can handle; this is very likely because of the need to replicate this config to the entire cluster.
This should work: and has three steps.
Back up your database. Or ensure you can restore from a recent snapshot.
Make sure you do not skip step 1
ssh into one of your Postgres units. Ideally the leader! then:
After this you can confirm that the value was updated in the Stolon-managed postgres.conf and also in pg_settings. I tried rebooting a few of my units as well and the change seems to stick nicely if done this way.
I’ve used the solution Daniel has proposed as well several times. I changed a few other things after using this calculator. https://pgtune.leopard.in.ua/
You’ll have to restart your instance after making the changes.