Re: Error since powerouttage

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Daniel E(dot) Fisher" <danfisher(at)bwkip(dot)com>
Cc: PGSQL List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error since powerouttage
Date: 2004-01-13 19:25:32
Message-ID: 20040113192532.GB5401@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 13, 2004 at 14:08:14 -0500,
"Daniel E. Fisher" <danfisher(at)bwkip(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel E. Fisher 2004-01-13 19:26:01 Error since powerouttage
Previous Message Bruno Wolff III 2004-01-13 19:14:43 Re: Best practice? Web application: single PostgreSQL