Re: Postgresql does not see its files HEEEELP!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marcin Gil" <marcin(dot)gil(at)audax(dot)com(dot)pl>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgresql does not see its files HEEEELP!
Date: 2003-09-08 15:10:49
Message-ID: 13871.1063033849@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Marcin Gil" <marcin(dot)gil(at)audax(dot)com(dot)pl> writes:
> I got a legacy server to maintain, with PGSQL 7.0, Redhat 6 or smthing.
> One day a power interrupt changed my life to hell.
> Postmaster doesn't start, and when I start it manually
> as user postgres it does not see its databases.. All the files
> are right there!!
> When I do psql -> \l: all I see is template1. All the bases are gone
> But when I connect : \c bip_um -> it connect to the database
> but \dt is empty..

Other than the reference to a power failure, this sounds more like a
transaction counter wraparound than anything else. How large is the
$PGDATA/pg_log file? If it's exactly 1 gigabyte then you've probably
suffered a wraparound. It is possible to get out of this (the idea
is to set the transaction counter a little less than 4 billion,
start the server, and immediately do pgdump_all before the counter
wraps around again) ... but I do not recall the details of how to do
it in 7.0. Check the PG list archives, you may find a recipe.

You should be running 7.2 or later anyway, if you have data you care
about.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Derrick Betts 2003-09-08 15:30:14 SQL Error: pqReadData() -- read() failed: errno=0 No error
Previous Message Marcin Gil 2003-09-08 12:46:56 Postgresql does not see its files HEEEELP!