Re: Did I wipe off my database -- please help - urgent - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: Did I wipe off my database -- please help - urgent
Date
Msg-id 20060807155753.21049.qmail@web31807.mail.mud.yahoo.com
Whole thread Raw
In response to Did I wipe off my database -- please help - urgent  (Srinivas Iyyer <srini_iyyer_bio@yahoo.com>)
List pgsql-novice
> I read the bug report :
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143208
> reason:

I am not too sure about problems with SELINUX but the purpose of this thread was attempting to
upgrade this server to a new version of Postgresql.  I presume that this person had a complete
pg_dump of the postgresql cluster before beginning the upgrade.

> I got error when i tried \dt
> relation "pg_catalog.pg_user" does not exist.

I am not sure what the reason behind this error is.  However, I've seen similar threads on the
mailing lists, I would guess that it was caused by either OID/XID wrap-around or corruption of one
of your data's pages.  There may be other causes of course.

The two solutions that I've seen were to vacuum the affected database or determine the corrupted
page and delete it.

> After reading some responses Comment#21 and Comment#22
> (I have no clue why I am getting that error and no
> idea about SELinux).
>
> I tried the following:
> $sudo /etc/rc.d/init.d/postgresql stop
> $ psql -d mrnatest
> psql: could not connect to server: S
>         Is the server running locally and accepting
>         connections on Unix domain socket
> "/tmp/.s.PGSQL.5432"?

After you stopped the Postgresql Server, this would be an expected error to get if you tried to
connect to it.

>
> $ sudo rm -rf /var/lib/pgsql/data
> $ sudo /sbin/restorecon -R /var/lib/pgsql
> $ sudo /etc/rc.d/init.d/postgresql start

In short...
you completely deleted all of your data, log, and config files from your hard-drive.
I am not to sure what restorecon does.
Next you created a brand new postgresql cluster on the directory where your former db cluster use
to reside.

I guess this would be a good time to ask if you have a recently back-up copy handy so that you can
restore your database.

> The reason I donot have a backup also is that, my
> pg_dump is not working.

Ouch...  I am pretty sure you are not going to get your data back with out a back-up copy.

Maybe someone else on the list knows of any forensic services that can reconstruct deleted data?

Sorry.

Regards,

Richard Broersma Jr.


pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Re: Did I wipe off my database -- please help - urgent
Next
From: Saranya Sivakumar
Date:
Subject: Re: [PERFORM] 7.3.2 pg_restore very slow