pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Terry Khatri <terrykhatri531@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Error on pg_dumpall
Date: Tue, 23 Oct 2012 13:15:57 +0800
Message-ID: <5086280D.7010907@ringerc.id.au> (raw)
In-Reply-To: <CANH4f+jodV27BeU7mgX=gzFfOViBWwN7Bd9RDcBFXjceG5wmBA@mail.gmail.com>
References: <CANH4f+jodV27BeU7mgX=gzFfOViBWwN7Bd9RDcBFXjceG5wmBA@mail.gmail.com>

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




view thread (7+ messages)  latest in thread

Message-ID: <5086280D.7010907@ringerc.id.au>
Permalink:  ../5086280D.7010907@ringerc.id.au/
Also on:    postgresql.org/message-id/5086280D.7010907@ringerc.id.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ringerc@ringerc.id.au, terrykhatri531@gmail.com
  Subject: Re: Error on pg_dumpall
  In-Reply-To: <5086280D.7010907@ringerc.id.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox