Re: Can't restart Postgres

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

Permissions are identical to live. I've checked the /tmp folder for a
PID reference, but doesn't exist in live or dev.

What do you mean by "variables"? How can I check?

I only have one postgresql database cluster on each server.

With regards to the config causing memory problems, the specs of both
environments are absolutely identical. Same kernel, same disk space,
same distro, same memory. In fact the development environment had to
be rebuilt so we cloned live and changed the necessary settings. Is
that potentially an issue, bearing in mind it had been running until
now?

By virtual machine I mean the entire systems are running within
virtual machines on different physical machines. It is completely
unaware of its host and localhost is a true localhost as far as its
concerned.

The port numbers are only different because we also have a staging
virtual machine which is on the default port and to remotely connect
to both we just changed the port on the development one to an unused
one. This is the port is has been running on until now.

Thanks

Thom

On Wed, Oct 29, 2008 at 3:57 PM, Serge Fonville
<serge(dot)fonville(at)gmail(dot)com> wrote:
> 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

Browse pgsql-general by date

  From Date Subject
Next Message justin 2008-10-29 17:32:04 Re: Are there plans to add data compression feature to postgresql?
Previous Message Andrew Edson 2008-10-29 17:09:28 Weird problem concerning tsearch functions built into postgres 8.3, assistance requested