Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TQWqd-0000L8-FD for pgsql-admin@postgresql.org; Tue, 23 Oct 2012 05:16:15 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TQWqX-0006OJ-4Z for pgsql-admin@postgresql.org; Tue, 23 Oct 2012 05:16:15 +0000 Received: by mail-pb0-f46.google.com with SMTP id rr4so168614pbb.19 for ; Mon, 22 Oct 2012 22:16:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=qUeD54dsb0VuE0jtvpMBkq/2IIR063kGXMn6kcccC3A=; b=a0HXwoYQpMrgciFBVGo9jh+NI4aEW1gT5OS9GCxDa++CH0AvclGuLTlokofURsAF8+ L/rwLWIxMniNNHMZofMmjwIu6DXsWio5Bdh6c4JlKCTbcVOka7FyM5QEhT7ITNj/Cbby GSBfXWzH2h2NYmYIp3YnAvwyspdQlYd6uX7Fgg7vj6dp7V5GKWxBGpqHNq1xO6jDn1st HTEMv4rbNcN0796AYALDCuWeXD7c6IN1QAbIIm0n2IYzjlETH6Gahv/fK8KFoNW80kId wzCZq/A57w988Qt8RACC0JbcLIqOLdHvN07G8CIrQGhUCxCLf/yZBq/XVYs0LNpZmA+G 7X6g== Received: by 10.66.88.133 with SMTP id bg5mr31841517pab.80.1350969367342; Mon, 22 Oct 2012 22:16:07 -0700 (PDT) Received: from ayaki.localdomain (office1.postnewspapers.com.au. [150.101.171.128]) by mx.google.com with ESMTPS id qq9sm4892991pbb.16.2012.10.22.22.16.03 (version=SSLv3 cipher=OTHER); Mon, 22 Oct 2012 22:16:06 -0700 (PDT) Message-ID: <5086280D.7010907@ringerc.id.au> Date: Tue, 23 Oct 2012 13:15:57 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Terry Khatri CC: pgsql-admin@postgresql.org Subject: Re: Error on pg_dumpall References: In-Reply-To: X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmfDLPYdTaicjRuV2gQ7ByxLm8QSZaTFQdgtt6kV6SRGA4PFGUDRC+Ufmy1ydebCWW3kxWU X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/110 X-Sequence-Number: 40226 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