[RFE] Reloadable PostgreSQL #65296
Labels
0.kind: enhancement
Add something new
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
6.topic: user experience
9.needs: module (update)
This needs a module to be changed
Meta-issue for making PG truly reloadable. The reason for this is because not everybody implements correct handling of PG reboots
General thoughts
reloadIfChanged
NixOS systemd option doesn't work well here. Yes, it sends SIGHUP, but no, nothing actually changes on filesystem (due to immutability)reloadable = true;
for PG, I still want to be notified about when restart is required. Maybewarn
during activation, maybe something automatible (allow send webhooks, notification, etc)Configuration
Some configuration option require restart, but most often they don't. The only reliable way to distiguish them is to parse sample PG config and extract params with
(change requires restart)
. We can't just SIGHUP PG and parse it's reload output - it does reload but still barfs about "restart required".Then split
extraConfig
into "reloadable" and "restart-required" configs, and disallow "restart-only" options in "reloadable" subconfig. Kinda complicated...And yes, "reloadable" config should be implemented using
environment.etc
or any other kind of managed state. Alternatively, drop immutability for PG config and move it back to PG datadir.Same for
pg_hba.conf
. It's change doesn't require restart.Plugins
In #61480 @jamessewell notes, that some plugins can be added without restart. This requires some managed state for plugins, which can be implemented using
environment.etc
.Plugins which must set
shared_preload_libraries
should trigger restart as per configuration change.SQL scripts
Currently adding SQL scripts in
postStart
makes PG restarts. This includesensureDatabases
option. It really shouldn't.The text was updated successfully, but these errors were encountered: