Thread: Postgresql does not see its files HEEEELP!

Postgresql does not see its files HEEEELP!

From
"Marcin Gil"
Date:
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


Re: Postgresql does not see its files HEEEELP!

From
Tom Lane
Date:
"Marcin Gil" <marcin.gil@audax.com.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