From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Date: Fri, 18 Jan 2019 19:24:18 -0500
Message-ID: <16266.1547857458@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-Wzk-57Bw6PazMEVMLn2T5enHMoq-PqXR8LGxjJO0kgm0+w@mail.gmail.com>
References: <CAH2-WzmYbkT6e9B1jWApV5HcApUZqC==yoC4VTi7TBs007Ki+g@mail.gmail.com>
<20181218212053.4vqcmmcicbzr2jyc@alvherre.pgsql>
<CAH2-WzkMmRkXsWaVZ+VEbKdcKRcTuxu5ogVVH1SARqVuTuQKHA@mail.gmail.com>
<21925.1545171102@sss.pgh.pa.us>
<CAH2-Wz=rmUGgdp8K-FB1VRQngHk7MdtKvEATFQ_pP3_N257t8g@mail.gmail.com>
<22791.1545171984@sss.pgh.pa.us>
<CAH2-WzmQuksC_sWR8Z0aqxAVC6bBAcwU3bHv=rbf8Hp1RdJjvA@mail.gmail.com>
<15190.1547757720@sss.pgh.pa.us>
<CAH2-WznWGEaEBX=PqwdXOS_WwcRS-kB5zA5kdrmqXKmP7b6FuA@mail.gmail.com>
<24211.1547772026@sss.pgh.pa.us>
<CAH2-WzkMFfJb0_qCZQ2vxrF2fW3xEio0fG-MBT7ky8-9a13XKQ@mail.gmail.com>
<12244.1547854440@sss.pgh.pa.us>
<CAH2-Wzk-57Bw6PazMEVMLn2T5enHMoq-PqXR8LGxjJO0kgm0+w@mail.gmail.com>
Peter Geoghegan <pg@bowt.ie> writes:
> On Fri, Jan 18, 2019 at 3:34 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Attached is a draft patch to sort objects before the recursion step
>> in findDependentObjects. I found that sorting by descending OID is
>> really the right thing; if we sort by increasing OID then we get a
>> whole lot more diffs in the DROP CASCADE output. As shown, there
>> are just a few such diffs, and many of them seem to be for the better
>> anyway.
> This reminds me of the output that I saw back when my patch used DESC
> heap TID order. I agree that those regression test changes are
> improvements. I think that they're caused by the existing nbtree
> code's preference for storing duplicates on the first leaf page it
> could go on that is found to be empty.
Yeah, I figured the explanation for the weirder changes was somewhere
around there. Like you, I haven't bothered to verify it.
>> * There is still instability in which object you get told to drop
>> when attempting to drop an index partition or trigger, as a consequence
>> of there being two possible DEPENDENCY_INTERNAL_AUTO targets. I still
>> feel that the right fix there involves changing the design for what
>> dependency types we store, but I've not worked on it yet.
> I thought that your ALTER OBJECT DEPENDS ON EXTENSION example made the
> case for fixing that directly inarguable. I'm slightly surprised that
> you're not fully convinced of this already. Have I missed some
> subtlety?
It's clear that we must change *something* in that area. I'm not yet
wedded to a particular fix, just expressing a guess as to what might
be the cleanest fix.
Also, we evidently need something we can back-patch into v11, which might
end up being very far from clean :-(. I have no opinions yet on what
would make sense in that branch.
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, alvherre@2ndquadrant.com
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
In-Reply-To: <16266.1547857458@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