Re: Can't restart Postgres - Mailing list pgsql-general

From Richard Huxton
Subject Re: Can't restart Postgres
Date
Msg-id 4908877E.4090603@archonet.com
Whole thread Raw
In response to Can't restart Postgres  ("Thom Brown" <thombrown@gmail.com>)
List pgsql-general
Thom Brown 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

What do you mean by "virtual server"? And does it affect definitions of
localhost or shared-memory allocation?

> 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?

Your system isn't set up the way you think it is - the .pid file is
missing. Is it looking in the right place?

> waiting for server to
> start...............................................................could
> not start server                                        [ !! ]
>  * The pid-file doesn't exist but pg_ctl reported a running server.

> If you're curious, the settings I changed in postgresql.conf are as follows:
>
> OLD: shared_buffers = 24MB
> NEW: shared_buffers = 128MB

This can cause problems if your kernel doesn't allocate enough
shared-memory, but you should get a different error message.

> Note that the live and development configs are identical except for
> the port number.

Are they reading the right config files?

> Netstat data
>
> # netstat -a
> Active Internet connections (servers and established)
[snip]

I don't see postgresql here at all. Mysql, fam, fail2ban but not PG.

> If anyone can offer some insight I'd be grateful.

If you've got two installations on the same machine having problems then
either:
1. They're *not* running on different ports with different data
directories (check you're using the correct config file for each)

2. They're having problems with shared memory (in which case you should
see a different error message).

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: psql screen size
Next
From: "Serge Fonville"
Date:
Subject: Re: Can't restart Postgres