Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzc7f-0005wU-7d for pgsql-admin@arkaria.postgresql.org; Tue, 02 Jun 2015 02:40:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yzc7e-0002pA-N1 for pgsql-admin@arkaria.postgresql.org; Tue, 02 Jun 2015 02:40:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yzc7d-0002oV-GG for pgsql-admin@postgresql.org; Tue, 02 Jun 2015 02:40:09 +0000 Received: from smtp1.cvent.com ([198.207.146.196]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Yzc7V-00086o-RK for pgsql-admin@postgresql.org; Tue, 02 Jun 2015 02:40:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvent.com; i=@cvent.com; q=dns/txt; s=c1211; t=1433212801; x=1464748801; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=NEL4D4EpFSCqvUQi0yaxWpPQrp/5dtU/Ipg9eyKO+yU=; b=m3YmRehT6nToFRLJ0Bf+pKLWm2KFPZHiE5gxegx1spVBwjL1bAhuCG/g Xq4LWrB+889obdk/OWogcaW7wgCmlEOhfVReDVc2ckgSEUWLSEOtWIycN +GsfFqLsMIaqPA3HRZEmjHiPEiIBKPJKMIORjxegz+8136Y5bMdguWvpz E=; X-IronPort-AV: E=Sophos;i="5.13,536,1427774400"; d="scan'208";a="46093955" From: "Guo, Yun" To: Tom Lane CC: 'Albe Laurenz' , "pgsql-admin@postgresql.org" Subject: Re: pg_dump not dumping some schemas Thread-Topic: [ADMIN] pg_dump not dumping some schemas Thread-Index: AQHQmWrG8qD1Kd5wwECxQFQUQc4hUJ2SmSMwgABZZgCABFkg4IAAXWMAgAAHsYCAAAXooIAARaiAgACLsgA= Date: Tue, 2 Jun 2015 02:39:59 +0000 Message-ID: References: <2DB6C5478F692C4C983B3129CC1AEB14CA65E8C8@HQ08HQMX002.cvent.net> <17196.1433168399@sss.pgh.pa.us> In-Reply-To: <17196.1433168399@sss.pgh.pa.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.0.150423 Content-Type: text/plain; charset="us-ascii" Content-ID: <08D5135FF4B99A49A18DA2C1FBF7602B@cvent.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Pg-Spam-Score: -1.6 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi Tom, I tried gdb on selectDumpableNamespace() and dumpNamespace(). So it looks like for those problematic schemas,the dump value is 1 in selectDumpableNamespace() which is correct, but when it goes to dumpNamespace() the dump value becomes 0, so it get skipped. Breakpoint 2, selectDumpableNamespace (nsinfo=3D0x6600c0) at pg_dump.c:1227 (gdb) p nsinfo.dobj $17 =3D {objType =3D DO_NAMESPACE, catId =3D {tableoid =3D 2615, oid =3D 17= 972}, dumpId =3D 13, name =3D 0x660d80 "test", namespace =3D 0x0, dump =3D 1 '\001', ext_member =3D 0 '\000', dependencies =3D 0x0, nDeps = =3D 0, allocDeps =3D 0} Breakpoint 1, dumpNamespace (fout=3D0x654290, nspinfo=3D0x6600c0) at pg_dump.c:7930 7930 { (gdb) p nspinfo.dobj $31 =3D {objType =3D DO_NAMESPACE, catId =3D {tableoid =3D 2615, oid =3D 17= 972}, dumpId =3D 13, name =3D 0x660d80 "test", namespace =3D 0x0, dump =3D 0 '\000', ext_member =3D 1 '\001', dependencies =3D 0x6e2b60, nD= eps =3D 1, allocDeps =3D 16} What could possibly change the dump value between selectDumpableNamespace and dumpNamespace ? On 6/1/15, 10:19 AM, "Tom Lane" wrote: >"Guo, Yun" writes: >> Is there a way to repair the database if it's corrupted? > >There's no evidence here that you've got any server-side corruption. >pg_dump should be getting back the exact same results you got >manually. > >(BTW, I assume you've ruled out the possibility that pg_dump is connecting >to some other server or database than the one you're looking at >manually...) > > regards, tom lane --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin