Peter Geoghegan <p...@bowt.ie> writes: > On Fri, Jan 18, 2019 at 3:34 PM Tom Lane <t...@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