Re: Can't restart Postgres

From: "Serge Fonville" <serge(dot)fonville(at)gmail(dot)com>
To: "Thom Brown" <thombrown(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can't restart Postgres
Date: 2008-10-29 15:57:28
Message-ID: 680cbe0e0810290857u13f96854gddbad19abe2fff55@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
Did you check permissions?
Do the pid files exist?
What variables are set?

Regards,

Serge Fonville

On Wed, Oct 29, 2008 at 4:43 PM, Thom Brown <thombrown(at)gmail(dot)com> wrote:

> Hi,
>
> I've got a development virtual server which matches live exactly
> except for the fact that Postgres is running on a different port which
> is not used by anything else. Postgres was running fine until I
> updated postgresql.conf to enhance logging and make better use of
> system resources.
>
> Here's the problem:
>
> # /etc/init.d/postgresql-8.3 restart
> * Stopping PostgreSQL (this can take up to 90 seconds) ...
> pg_ctl: PID file "/var/lib/postgresql/8.3/data/postmaster.pid" does not
> exist
> Is server running?
> * Some clients did not disconnect within 30 seconds.
> * Going to shutdown the server anyway.
> pg_ctl: PID file "/var/lib/postgresql/8.3/data/postmaster.pid" does not
> exist
> Is server running?
> * Shutting down the server gracefully failed.
> * Forcing it to shutdown which leads to a recover-run on next startup.
> pg_ctl: PID file "/var/lib/postgresql/8.3/data/postmaster.pid" does not
> exist
> Is server running?
> * Forced shutdown failed!!! Something is wrong with your system,
> please take care of it manually.
> [ ok ]
> * Starting PostgreSQL ...
> waiting for server to
> start...............................................................could
> not start server [ !! ]
> * The pid-file doesn't exist but pg_ctl reported a running server.
> * Please check whether there is another server running on the same
> port or read the log-file.
>
>
> If you're curious, the settings I changed in postgresql.conf are as
> follows:
>
> OLD: shared_buffers = 24MB
> NEW: shared_buffers = 128MB
>
> OLD: #log_destination = 'stderr'
> NEW: log_destination = 'stderr'
>
> OLD: #logging_collector = off
> NEW: logging_collector = on
>
> OLD: #log_directory = 'pg_log'
> NEW: log_directory = '/var/log/pg_log'
>
> OLD: #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
> NEW: log_filename = 'postgresql-%Y-%m-%d.log'
>
> OLD: #log_rotation_age = 1d
> NEW: log_rotation_age = 1d
>
> OLD: #log_min_duration_statement = -1
> NEW: log_min_duration_statement = 0
>
> OLD: #log_duration = off
> NEW: log_duration = on
>
> OLD: #log_line_prefix = ''
> NEW: log_line_prefix = '%t [%p]: [%l-1] '
>
> Note that the live and development configs are identical except for
> the port number.
>
> Netstat data
>
> # netstat -a
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 localhost:mysql *:* LISTEN
> tcp 0 0 *:sunrpc *:* LISTEN
> tcp 0 0 *:39571 *:* LISTEN
> tcp6 0 0 [::]:http-alt [::]:* LISTEN
> tcp6 0 0 [::]:http [::]:* LISTEN
> tcp6 0 0 [::]:ssh [::]:* LISTEN
> tcp6 0 0 [::]:https [::]:* LISTEN
> tcp6 0 732 linode-dev.prehisto:ssh 217.154.203.18:4244
> ESTABLISHED
> udp 0 0 *:779 *:*
> udp 0 0 *:32781 *:*
> udp 0 0 *:sunrpc *:*
> Active UNIX domain sockets (servers and established)
> Proto RefCnt Flags Type State I-Node Path
> unix 2 [ ACC ] STREAM LISTENING 7294 @/tmp/fam-root-
> unix 2 [ ACC ] STREAM LISTENING 1745591
> /var/run/cgisock.19119
> unix 2 [ ] DGRAM 179
> @/org/kernel/udev/udevd
> unix 2 [ ACC ] STREAM LISTENING 6073 /dev/log
> unix 2 [ ACC ] STREAM LISTENING 7275
> /var/run/fail2ban/fail2ban.sock
> unix 2 [ ACC ] STREAM LISTENING 88239
> /var/run/mysqld/mysqld.sock
> unix 3 [ ] STREAM CONNECTED 1799425 /dev/log
> unix 3 [ ] STREAM CONNECTED 1799424
> unix 3 [ ] STREAM CONNECTED 1799422
> unix 3 [ ] STREAM CONNECTED 1799421
> unix 3 [ ] STREAM CONNECTED 1746483 /dev/log
> unix 3 [ ] STREAM CONNECTED 1746482
> unix 3 [ ] STREAM CONNECTED 1746384 /dev/log
> unix 3 [ ] STREAM CONNECTED 1746382
> unix 3 [ ] STREAM CONNECTED 7427 /dev/log
> unix 3 [ ] STREAM CONNECTED 7426
> unix 3 [ ] STREAM CONNECTED 7298 @/tmp/fam-root-
> unix 3 [ ] STREAM CONNECTED 7295
> unix 3 [ ] STREAM CONNECTED 6511 /dev/log
> unix 3 [ ] STREAM CONNECTED 6508
>
> I'm sure I've had this problem before (a few months ago on my home PC)
> and never did solve it.
>
> If anyone can offer some insight I'd be grateful.
>
> Thanks
>
> Thom
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-10-29 16:05:32 Re: psql screen size
Previous Message Richard Huxton 2008-10-29 15:55:42 Re: Can't restart Postgres