Re: Error on pg_dumpall

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Error on pg_dumpall
Дата
Msg-id 5086280D.7010907@ringerc.id.au
обсуждение исходный текст
Ответ на Error on pg_dumpall  (Terry Khatri <terrykhatri531@gmail.com>)
Ответы Re: Error on pg_dumpall  (Terry Khatri <terrykhatri531@gmail.com>)
Список pgsql-admin
On 10/22/2012 03:24 AM, Terry Khatri wrote:
> Hi
>
> I am getting the following error msg when I do a pg_dumpall
>
> -----
>
> TK@OraLinux /usr/local/pgsql/backups
> $ pg_dumpall -U sns84 > completebackup20121020,sql
> pg_dump: schema with OID 74363 does not exist
> pg_dumpall: pg_dump failed on database "bihistory", exiting

That's not good.

First, try per-database dumps. Work out which database has the problem.
Do a:

    pg_dumpall -U sns84  --globals-only > globals.sql

then for each database:

    pg_dump -U sns84 -f $dbname.sql $dbname

(scripting it if desired), until you see which DB fails to dump. Dump
all the DBs you can successfully dump before proceeding.

Then, in the problem dB, try:

    REINDEX pg_catalog.pg_namespace;

does that help?

What's the output of:

    SELECT oid, nspname FROM pg_catalog.pg_namespace;

in the problem DB?

What about \dn in psql?

Is all your data for the problem DB in the "public" schema? If so, can
you do a schema-only dump?

  pg_dump -U sns84 -n public -f $dbname.dump $dbname

--
Craig Ringer



--
Craig Ringer


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Streaming Replication Server Crash
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Streaming Replication Server Crash