Re: [BUGS] BUG #8177: initscript should create /var/run/postgresql

From: stronny red <stronny(at)celestia(dot)ru>
To: Christoph Berg <myon(at)debian(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-pkg-debian(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #8177: initscript should create /var/run/postgresql
Date: 2013-05-30 07:29:13
Message-ID: CALOvDf7fpScGUJBai69S3=Mr5wC-Xj5BZEqnV4qQBjOHXcj+Zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-pkg-debian

I was able to reproduce the problem.

Package versions
-----------------
ii postgresql-9.2 9.2.4-1.pgdg60+1
object-relational SQL database, version 9.2 server
ii postgresql-common 142.pgdg60+1
PostgreSQL database-cluster manager

The failure
-----------------
# /etc/init.d/postgresql stop
# rm -rf /var/run/postgresql
# /etc/init.d/postgresql start
Error: Cannot stat /var/run/postgresql
No PostgreSQL clusters exist; see "man pg_createcluster" ... (warning).

The config file
-----------------
# ls -lA /etc/postgresql/9.2
total 0
lrwxrwxrwx 1 root root 23 May 22 20:36 main -> /var/lib/postgresql/etc
# cat /etc/postgresql/9.2/main/postgresql.conf
data_directory = '/var/lib/postgresql/9.2/main'
hba_file = '/var/lib/postgresql/etc/pg_hba.conf'
external_pid_file = '/var/run/postgresql/9.2-main.pid'
ssl = true
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
log_line_prefix = '%t '
log_timezone = 'Europe/Moscow'

listen_addresses = '*'
wal_level = hot_standby
max_wal_senders = 3
wal_keep_segments = 8

On Thu, May 30, 2013 at 6:58 AM, Christoph Berg <myon(at)debian(dot)org> wrote:

> On Mon, 2013-05-27 at 09:27 +0000, stronny(at)celestia(dot)ru wrote:
> > The following bug has been logged on the website:
> >
> > Bug reference: 8177
> > Logged by: stronny
> > Email address: stronny(at)celestia(dot)ru
> > PostgreSQL version: 9.2.4
> > Operating system: wheezy
> > Description:
> >
> > When installed from apt.postgresql.org Postgres fails to start on system
> > boot.
> >
> > Wheezy changed /var/run to become memory-based so initscript should
> create
> > /var/run/postgresql if necessary.
>
> start() {
> # create socket directory
> if [ -d /var/run/postgresql ]; then
> chmod 2775 /var/run/postgresql
> else
> install -d -m 2775 -o postgres -g postgres /var/run/postgresql
> fi
>
> do_ctl_all start "$1" "Starting PostgreSQL $1 database server"
> }
>
> We create the directory, what specifically doesn't work for you?
>
> Christoph
> --
> cb(at)df7cb(dot)de | http://www.df7cb.de/
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message vishnu.singh 2013-05-30 11:14:44 BUG #8190: Issue with slony-I replication on postgres master and slave database
Previous Message Christoph Berg 2013-05-30 02:58:35 Re: [BUGS] BUG #8177: initscript should create /var/run/postgresql

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message Christoph Berg 2013-06-01 04:33:08 Re: [BUGS] BUG #8177: initscript should create /var/run/postgresql
Previous Message Christoph Berg 2013-05-30 02:58:35 Re: [BUGS] BUG #8177: initscript should create /var/run/postgresql