From: | "Guo, Yun" <YGuo(at)cvent(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 'Albe Laurenz' <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: pg_dump not dumping some schemas |
Date: | 2015-06-02 13:41:39 |
Message-ID: | D19329C5.37A5E%yguo@cvent.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
InterestingŠ I checked the pg_depend for that schema, looks like it¹s
depending on an extension.
polling_etl=# SELECT classid, objid, refclassid, refobjid
FROM pg_depend
WHERE refclassid = 'pg_extension'::regclass
AND deptype = 'e' and objid = 17972
ORDER BY 3,4;
classid | objid | refclassid | refobjid
---------+-------+------------+----------
2615 | 17972 | 3079 | 16730
^^^^^^
polling_etl=# select * from pg_extension where oid = 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" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>"Guo, Yun" <YGuo(at)cvent(dot)com> 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=0x654290, nspinfo=0x6600c0) at
>> pg_dump.c:7930
>> 7930 {
>> (gdb) p nspinfo.dobj
>> $31 = {objType = DO_NAMESPACE, catId = {tableoid = 2615, oid = 17972},
>> dumpId = 13, name = 0x660d80 "test", namespace = 0x0,
>> dump = 0 '\000', ext_member = 1 '\001', dependencies = 0x6e2b60,
>>nDeps = 1, allocDeps = 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
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2015-06-02 14:02:46 | Re: pg_dump not dumping some schemas |
Previous Message | Tom Lane | 2015-06-02 03:01:28 | Re: pg_dump not dumping some schemas |