zalando / spilo

Highly available elephant herd: HA PostgreSQL cluster using Docker
Apache License 2.0
1.53k stars 382 forks source link

Changing PostgreSQL parameters (and spilo configs [if possible]) without restart #856

Closed mhkarimi1383 closed 1 year ago

mhkarimi1383 commented 1 year ago

Hi, In Spilo I want to change my configs without restarting the PostgreSQL server (in docker-compose) But I found that the only way to change configs is setting SPILO_CONFIGURATION or PATRONI_CONFIGURATION envs, but we want to change that without restarting the server and just reloading the PostgreSQL server (by just a signal or pg_ctl reload -D "$PGDATA") itself (and restart manually if needed [that's good to be reported if a server requires restart in patronictl list])

Also I don't want to use something like ALTER SYSTEM

If that's possible I was not able to find any documentation

hughcapet commented 1 year ago

PostgreSQL restart necessity depends on which param you want to modify. Generally speaking, you change PosrgreSQL configuration via either dynamic or local Patroni configuration, which you can read about in Patroni docs