Re: Autostart PostgreSQL in Ubuntu - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Autostart PostgreSQL in Ubuntu
Date
Msg-id 200709262205.21721.peter_e@gmx.net
Whole thread Raw
In response to Autostart PostgreSQL in Ubuntu  (Johann Maar <johann.maar@gmx.net>)
Responses Re: Autostart PostgreSQL in Ubuntu  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Autostart PostgreSQL in Ubuntu  (Johann Maar <johann.maar@gmx.net>)
List pgsql-general
Johann Maar wrote:
> But if I try to start PostgreSQL by running "sudo /etc/init.d/
> postgresql start" it will fail because it tries to write a PID file
> to "/var/run/postgresql" which does not exist. If I create this
> directory and set the permissions for postgres to write it works (!),
> but after the next restart of the machine the directory is already
> gone.

/var/run/ might be on a temporary file system.  So you need to adjust
your init script to create that directory if it doesn't exist.

> I tried to change the location of the PID target directory in
> postgresql.conf, but then clients like psql still try to find the PID
> file in /var/run/ postgresql and fail.

You must be mistaken about this.  psql shouldn't have a reason to read
the server's PID file.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-general by date:

Previous
From: "John Smith"
Date:
Subject: decode access privileges
Next
From: Richard Broersma Jr
Date:
Subject: Re: decode access privileges