zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.38k stars 980 forks source link

Expose `max_locks_per_transaction` property #2702

Closed A-725-K closed 3 months ago

A-725-K commented 3 months ago

Feature request

Hello,

while working on a project I realized I had the need to manipulate the value of max_locks_per_transaction, but in the operator manifest I couldn't find a way to change it. It should be possible to provide a value in postgres.spec.patroni that is injected in the pod through the SPILO_CONFIGURATION environment variable, in the dcs section.

Notice that max_locks_per_transaction value cannot be changed at runtime, it requires restarting the server.

I would like to see this value exposed in the manifest so that it is tunable from a user perspective. I am willing to contribute to this issue myself, and I will provide soon a PR with a possible solution, too.

Thank you for your time, and best regards! :smiley:

FxKu commented 3 months ago

Have you tried the spec.postgresql.parameters section? This is where you can set postgres config parameters.

A-725-K commented 3 months ago

Thanks for the quick reply! Indeed, it worked. On the other hand, I find a little strange that similar configuration are passed in 2 different places. Feel free to close the PR, and thank you again for the help!