Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-12-18T18:46:59Z
Lists: pgsql-hackers
On Tue, Dec 18, 2018 at 10:26 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Yeah, I've been wondering about that as well. The original intention > for dependency traversal was that it'd work independently of the ordering > of entries in pg_depend. If it's not doing so, I'd call that a bug in > dependency traversal rather than something the index code needs to be > responsible for. It's clearly not doing so. Is somebody else actually going to fix it, though? I'm quite happy to stand aside to make way for a better solution, but I don't consider myself particularly qualified to come up with that better solution. The findDependentObjects() code is pretty subtle. > (Note that this statement doesn't disagree with our issues about needing > to suppress dependency reports in the regression tests; that's because > the order of reports about independent objects can legitimately depend on > the index order. But there shouldn't be any semantic differences.) The advantage of my admittedly kludgy approach is that it will almost completely eliminate any further need to suppress acceptable regression test differences -- those non-semantic output differences that we're already suppressing semi-regularly. In practice, adding a trailing attribute to each of the two pg_depend indexes almost entirely eliminates the need to play whack-a-mole. That has to be an advantage for the kind of approach that I've suggested. -- Peter Geoghegan
Commits
-
Redesign the partition dependency mechanism.
- 1d92a0c9f7dd 12.0 landed
-
Fix trigger drop procedure
- cc126b45ea5c 11.2 landed
- cb90de1aac18 12.0 landed
-
Sort the dependent objects before recursing in findDependentObjects().
- f1ad067fc3ae 12.0 landed
-
Avoid sometimes printing both tables and their columns in DROP CASCADE.
- 9194c4270b28 12.0 landed