From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Ryan Kelly <rpkelly22@gmail.com>
Cc: joe <joe@tanga.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key
Date: Thu, 21 Jun 2012 01:57:20 -0400
Message-ID: <16786.1340258240@sss.pgh.pa.us> (raw)
In-Reply-To: <16032.1340255828@sss.pgh.pa.us>
References: <E1Sh4QS-0000EB-4R@wrigleys.postgresql.org>
<20120619202058.GA7792@llserver.lakeliving.com>
<1340139400-sup-7121@alvh.no-ip.org>
<22882.1340141854@sss.pgh.pa.us>
<12801.1340155595@sss.pgh.pa.us>
<14084.1340159655@sss.pgh.pa.us>
<16032.1340255828@sss.pgh.pa.us>
I wrote:
>>> We could possibly hack something for the special case of rules, but
>>> I don't think this would be the last time we hear about this type of
>>> issue.
BTW, after comparing the dependencies emitted by this patch to those of
HEAD for the regression database, I am convinced that indeed view rules
are not the only issue; we have got a boatload of problems of this ilk,
for instance:
* objects dependent on array types link to an array-type entry that is
not in the dump, not to the base type that is
* composite types link to their underlying "DO_TABLE" entry (ie, the
pg_class entry for the composite type) and thus miss any dependencies
on, say, column data types
* objects dependent on extension members have dangling links; notably,
every single plpgsql function fails to have a visible dependency on the
plpgsql extension
* foreign key constraints have dependencies on PK indexes, but if the PK
index was declared as a constraint, it's not visible under its own ID in
the dump, so the dependency dangles.
The proposed patch fixes all these cases. I am not sure whether any of
the first three are hazards for parallel pg_restore, but the last one
is: AFAICS, it will result in all such FK constraints being restored
serially at the end, because the parallel loop never manages to clear
all of their dependencies. Surprising nobody's complained about that.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, rpkelly22@gmail.com, joe@tanga.com
Subject: Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key
In-Reply-To: <16786.1340258240@sss.pgh.pa.us>
References: <E1Sh4QS-0000EB-4R@wrigleys.postgresql.org> <20120619202058.GA7792@llserver.lakeliving.com> <1340139400-sup-7121@alvh.no-ip.org> <22882.1340141854@sss.pgh.pa.us> <12801.1340155595@sss.pgh.pa.us> <14084.1340159655@sss.pgh.pa.us> <16032.1340255828@sss.pgh.pa.us> <16786.1340258240@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox