Re: Error on pg_dumpall

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Terry Khatri <terrykhatri531(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Error on pg_dumpall
Date: 2012-10-23 05:15:57
Message-ID: 5086280D.7010907@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2012-10-23 05:20:31 Re: [ADMIN] Streaming Replication Server Crash
Previous Message Craig Ringer 2012-10-23 05:08:10 Re: Streaming Replication Server Crash