Re: Problems when dumping a database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems when dumping a database
Дата
Msg-id 26731.982898627@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problems when dumping a database  (Tressens Lionel <tressens@etud.insa-tlse.fr>)
Ответы Re: Problems when dumping a database  (Tressens Lionel <tressens@etud.insa-tlse.fr>)
Список pgsql-general
Tressens Lionel <tressens@etud.insa-tlse.fr> writes:
> Le 20.02.01 � 13:18, "Tom Lane" �crivait :
> )Tressens Lionel <tressens@etud.insa-tlse.fr> writes:
> )> My pgsql DBMS works great except that when I want to dump a database,
> )> pg_dump says that database template1 doesn't exist (actually it does !)
> )> and the dump is aborted...
> )
> )Curious.  Can you connect to template1 by hand (eg "psql template1")?

> Yes I can. But something strange is that I can use the tables of the
> template1 database :

> template1=> select * from pg_shadow;     (this will work)

> But I cannot list them :

> template1=> \d
> Couldn't find any tables, sequences or indices!

Hm.  Not finding any user tables in template1 is normal behavior ---
try \dS to view the system tables.  However, I now have a theory,
because psql has reported this condition as 'No relations found.'
since 7.0 or before.  Evidently you are invoking an old (6.5 or before)
psql.  What version is your database server, and is it possible you're
calling a psql of an older version?  And, even more to the point, a
pg_dump also of an older version?

> SELECT oid FROM pg_database WHERE datname = 'template1'

> But this SELECT returns two tuples ! I have two identical tuples in
> pg_database for template1.
> Perhaps deleting one will help me, but which one (equal ?).

This is definitely uncool, but I'm not sure if it's related to the
pg_dump problem or not.  You could try deleting the one of larger OID
(the correct OID for template1 is about 17000 depending on what version
you're running) and then do a pg_database vacuum.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Questions to lists / translations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problem while compiling user c functions in 7.1beta4