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

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

Can't access tables.

От
Lukasz Brodziak
Дата:
Hello,

I have a problem with viewing tables from my DB. The interesting thing
is that the physical files exist in the data folder but only some of
them are visible both in pgAdmin and the application that uses the DB.
What's more there's no trace of those tables in pg_class whatsoever. I
can view ca. half of the tables (120 out of almost 250). Have anyone
come accross such behaviour? The files appear to be fine compared to
another DB containing same tables and same data.

--
Łukasz Brodziak

Re: Can't access tables.

От
Tom Lane
Дата:
Lukasz Brodziak <lukasz.brodziak@gmail.com> writes:
> I have a problem with viewing tables from my DB. The interesting thing
> is that the physical files exist in the data folder but only some of
> them are visible both in pgAdmin and the application that uses the DB.
> What's more there's no trace of those tables in pg_class whatsoever. I
> can view ca. half of the tables (120 out of almost 250). Have anyone
> come accross such behaviour? The files appear to be fine compared to
> another DB containing same tables and same data.

We used to get reports of that sort of thing from people who hadn't
vacuumed pg_class in a very long time (>2 billion transactions).
The pg_class rows *were* there, but invisible to ordinary queries
because of wraparound.  That should be impossible in any modern
PG release branch, but since you didn't say what you're running,
maybe vacuuming the system catalogs would help.

            regards, tom lane