Обсуждение: Can't list tables

Поиск
Список
Период
Сортировка

Can't list tables

От
Jan Chrillesen
Дата:
I'm running 7.0.3 and want to upgrade to 7.1.1, but running pg_dumpall
only dumps template1. Also psql -l only lists template1 - the same with
\l

pg_dump <dbname> dumps nothing, but I'm still able to connect to a
database with psql and perform queries on the database. When connected
to a database \dt returns an empty list, so I guess I manage to break
something. Is it in any way possible to dump the existing databases and
upgrade to 7.1.1?

/Jan

Re: Can't list tables

От
Tom Lane
Дата:
Jan Chrillesen <jan@chrillesen.dk> writes:
> I'm running 7.0.3 and want to upgrade to 7.1.1, but running pg_dumpall
> only dumps template1. Also psql -l only lists template1 - the same with
> \l

Hm.  The most common reason for this sort of breakage is that you
deleted the users who owned databases, tables, etc --- pg_dump gets
confused when you do that.  Look at the owner columns (datdba in
pg_database, relowner in pg_class, etc) and make sure you have pg_shadow
entries with matching usesysid values.

            regards, tom lane