Re: Error since powerouttage - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Error since powerouttage
Date
Msg-id 20040113192532.GB5401@wolff.to
Whole thread Raw
In response to Error since powerouttage  ("Daniel E. Fisher" <danfisher@bwkip.com>)
List pgsql-general
On Tue, Jan 13, 2004 at 14:08:14 -0500,
  "Daniel E. Fisher" <danfisher@bwkip.com> wrote:
> Running a RH 9 system with postgres 7.3.2-3
>
> I come back after vacation and my system shutdown cause of a powerouttage on
> the block.
>
> I restart and i get this trying to access the database:
> "Warning: pg_connect() unable to connect to PostgreSQL server: could not
> connect to server: Connection refused Is the server running on host
> database.lhasi.org and accepting TCP/IP connections on port 5432? in
> /var/www/html/dealingwithcrohns/phpBB2/db/postgres7.php on line 79
> phpBB : Critical Error
>
> Could not connect to the database"
>
>
> If someone could help me that be great.
>
> I don't believe I saw postgres start on startup...but don't I have to start
> it by the pgsql user?
>
> -Dan

What might have happened is that some other service started during the reboot
that was previously used by the postgres postmaster before the outage.
This would prevent postgres from starting up.

You can avoid this by removing the pid file on reboot, but you want to make
sure that this only gets done on reboots, not service level changes or
you may end up with two postmasters running and trash your database.

The init script for postgres should handle starting it as the correct user.

pgsql-general by date:

Previous
From: "Daniel E. Fisher"
Date:
Subject: Error since powerouttage
Next
From: "Daniel E. Fisher"
Date:
Subject: Error since powerouttage