Re: missing data
Dave Perkins writes:
I'm running postgresql 6.5 on Red Hat Linux 6.2 and have run into a
situation where I am able to open a database connection using psql yet
there is no trace of any tables in the database even though all the data
files are present when I browse the database directory.
Depending on your definition of "no trace", this might work: Try
select relname, relowner from pg_class;
If this shows table names that sound familiar, then it is likely that the
user indicated by "relowner" disappeared. Look into the table pg_shadow
to make sure some user's usesysid column matches relowner. (It's safe to
change these with update commands.)
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Import Notes
Reply to msg id not found: 4.3.1.20010329134254.00aa43f0@shell.shore.net
Depending on your definition of "no trace", this might work: Try
select relname, relowner from pg_class;
If this shows table names that sound familiar, then it is likely that the
user indicated by "relowner" disappeared. Look into the table pg_shadow
to make sure some user's usesysid column matches relowner. (It's safe to
change these with update commands.)
Thanks for the prompt reply. I did find tables when running the SELECT you
suggested above and also found an entry in pg_shadow that matches relowner
for those tables.
Any thoughts on where this leaves me?
Thanks,
Dave
I've discovered that the database in question was lacking an entry in
pg_database. I took the liberty of inserting a record with what I believe
to be the appropriate info. The problem still persists, however. The
other thing I am noticing is that when I run the \dt comand I get the
"Couldn't find any tables!" error message, but when I run a select * query
I get an appropriate listing of fields for the table, but no records. I
sense that I'm close, but yet so far from restoring tranquility.
Thanks,
Dave