Guru Prasad <pnguruji@yahoo.com> writes:
> using postgres 7.1 version. Now the database got corrupted. I had no clue
> how it got corrupted. Basically, i did found that the data of various
> users existing (in /usr/local/pgsql/data directory). But there were no
> data existing in the following system catalogs.
> pg_database. (except template0 & template1)
> pg_shadow. (except postgres user. Previously 15 users were there.)
> pg_tables. (Not showing any user created tables. Only system tables
> get displayed).
> But the data structure of individual tables exist somewhere. Suppose if i
> do 'select * from tablename' then field names gets displayed but says 'no
> rows'. At the same time, i am unable to get the structure through
> \d tablename.
If there's no entry for your database in pg_database, how were you able
to connect to do a 'select * from tablename'?
I'd like to see exactly what you did and exactly what results you got,
not your interpretations about whether there's data in tables or not.
Whatever's going on here is probably more subtle than that.
regards, tom lane