Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YzmRv-0000Ec-55 for pgsql-admin@arkaria.postgresql.org; Tue, 02 Jun 2015 13:41:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YzmRu-0002Kv-KU for pgsql-admin@arkaria.postgresql.org; Tue, 02 Jun 2015 13:41:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YzmRt-0002Kj-LY for pgsql-admin@postgresql.org; Tue, 02 Jun 2015 13:41:45 +0000 Received: from smtp2.cvent.com ([65.97.54.246]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YzmRq-0003sw-EQ for pgsql-admin@postgresql.org; Tue, 02 Jun 2015 13:41:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvent.com; i=@cvent.com; q=dns/txt; s=c1211; t=1433252502; x=1464788502; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=ccVBRq77ZxeaRgZXOjzVathC3Eel41xofPWqGdxgwBY=; b=jWOVfE9dMMLc15wAYxlHtqAxth0WvW5lEdLPqbZw7Mqcl/L+8kKRz7BF NXG2TRQAhwr6DZj40lLMeVqHCZiOhoYVZ8IjBifLZ0qlXmXoWhm8LQx9T pEDeOqL6btFh39+WtxngpJ/0GdolFOTJ+PhvEAwh3gc7g5KwGw1phP/kr 4=; X-IronPort-AV: E=Sophos;i="5.13,540,1427774400"; d="scan'208";a="5505522" 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: AQHQmWrG8qD1Kd5wwECxQFQUQc4hUJ2SmSMwgABZZgCABFkg4IAAXWMAgAAHsYCAAAXooIAARaiAgACLsgCAAEkQAIAAb84A Date: Tue, 2 Jun 2015 13:41:39 +0000 Message-ID: References: <2DB6C5478F692C4C983B3129CC1AEB14CA65E8C8@HQ08HQMX002.cvent.net> <17196.1433168399@sss.pgh.pa.us> <11998.1433214088@sss.pgh.pa.us> In-Reply-To: <11998.1433214088@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="Windows-1252" Content-ID: <2BC253CD5E7AF44F8616B05B59FF014C@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 Interesting=8A I checked the pg_depend for that schema, looks like it=B9s depending on an extension. polling_etl=3D# SELECT classid, objid, refclassid, refobjid FROM pg_depend WHERE refclassid =3D 'pg_extension'::regclass AND deptype =3D 'e' and objid =3D 17972 ORDER BY 3,4; classid | objid | refclassid | refobjid ---------+-------+------------+---------- 2615 | 17972 | 3079 | 16730 ^^^^^^ polling_etl=3D# select * from pg_extension where oid =3D 16730; extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition ---------+----------+--------------+----------------+------------+--------- --+-------------- hstore | 10 | 16389 | t | 1.2 | | How can I remove this dependency? Or what should I do to make it dump the schema creation correctly? On 6/1/15, 11:01 PM, "Tom Lane" wrote: >"Guo, Yun" writes: >> 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. > >Oh really ... > >> 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= 17972}, >> dumpId =3D 13, name =3D 0x660d80 "test", namespace =3D 0x0, >> dump =3D 0 '\000', ext_member =3D 1 '\001', dependencies =3D 0x6e2b60, >>nDeps =3D 1, allocDeps =3D 16} > ^^^^^^^^^^^^^^ > >There's the problem: this schema is marked as a member object of an >extension, so it's not going to get dumped. The expectation is that it'd >be recreated during CREATE EXTENSION of whatever extension it belongs to. > > 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