Hi Peter, thanks for working on this, I'm looking forward to make Debian's pg_*cluster tools work with that (and hopefully be able to remove tons of legacy code).
If a cluster is configured for non-hot-standby replication, the READY=1 seems to never happen. Did you check if that doesn't trigger any timeouts with would make the unit "fail" or the like? @@ -2787,6 +2800,10 @@ reaper(SIGNAL_ARGS) ereport(LOG, (errmsg("database system is ready to accept connections"))); +#ifdef USE_SYSTEMD + sd_notify(0, "READY=1"); +#endif + continue; } @@ -4930,6 +4947,10 @@ sigusr1_handler(SIGNAL_ARGS) ereport(LOG, (errmsg("database system is ready to accept read only connections"))); +#ifdef USE_SYSTEMD + sd_notify(0, "READY=1"); +#endif + pmState = PM_HOT_STANDBY; /* Some workers may be scheduled to start now */ StartWorkerNeeded = true; Also, I'm wondering how hard it would be to get socket activation work with that? (I wouldn't necessarily recommend that for production use, but on my desktop it would certainly be helpful not to have all those 8.4/9.0/.../9.6 clusters running all the time doing nothing.) Christoph -- c...@df7cb.de | http://www.df7cb.de/
signature.asc
Description: PGP signature