Postgresql does not see its files HEEEELP!

Lists: pgsql-novice
From: "Marcin Gil" <marcin(dot)gil(at)audax(dot)com(dot)pl>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Postgresql does not see its files HEEEELP!
Date: 2003-09-08 12:46:56
Message-ID: 000901c37607$49b62bb0$2402a8c0@mg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Hi!
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..

Please help!

Regards,
--
Marcin Gil
marcin.gil @ audax.com.pl, tel. 694972082
OIS Audax Sp. z o.o., ul. Barlickiego 4, 97-200 Tomaszów Mazowiecki
tel/fax (44) 7247530, 7244401


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