[Pkg-postgresql-public] problems with postgresql and systemd after upgrade.

Christoph Berg myon at debian.org
Sat Jun 11 06:50:54 UTC 2016


Re: peter green 2016-06-11 <575B6F9A.5000506 at p10link.net>
> On 11/06/16 01:29, peter green wrote:
> > How do I fix this? after some poking arround I discovered I could start
> > the server manually with "pg_ctlcluster 9.4 main start" but that is
> > obviously not a good long term soloution .

Starting manually with "systemctl start postgresql at 9.4-main.service"
should have worked as well.

> Ok, I solved it, doing the cluster upgrade multiple times had led to the
> clusters startup option being set to manual. After setting
> /etc/postgresql/9.4/main/start.conf to auto and stopping the maually started
> instance with pg_ctlcluster I was able to start the service under systemd
> with "systemctl restart postgresql"
> 
> postgresql at 9.4-main.service shows as "started" but "disabled" apparently
> this is normal.

The magic part here is /lib/systemd/system-generators/postgresql-generator.
If you edit start.conf, you should run "systemctl daemon-reload" to
trigger the generator to update the symlink farm in
/run/systemd/generator/postgresql.service.wants/.

Apparently these symlinks don't show up as enabled in "systemctl
status", that's admittedly confusing.

I guess we should update the documentation to make the connection to
daemon-reload explicit. Will do so shortly.

Christoph



More information about the Pkg-postgresql-public mailing list