Re: pg_dump not dumping some schemas - Mailing list pgsql-admin

From Tom Lane
Subject Re: pg_dump not dumping some schemas
Date
Msg-id 11998.1433214088@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump not dumping some schemas  ("Guo, Yun" <YGuo@cvent.com>)
Responses Re: pg_dump not dumping some schemas
List pgsql-admin
"Guo, Yun" <YGuo@cvent.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


pgsql-admin by date:

Previous
From: "Guo, Yun"
Date:
Subject: Re: pg_dump not dumping some schemas
Next
From: "Guo, Yun"
Date:
Subject: Re: pg_dump not dumping some schemas