Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Andrei Lepikhov <a.lepikhov@postgrespro.ru>
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Peter Geoghegan <pg@bowt.ie>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-12-06T06:35:29Z
Lists: pgsql-hackers
Attachments
- 0001-Print-All-dependencies-on-error.patch (text/x-patch)
On 14.11.2018 11:28, Peter Geoghegan wrote: > We're already relying on the scan order being in reverse chronological > order, so we might as well formalize the dependency. I don't think > that it's possible to sort the pg_depend entries as a way of fixing > the breakage while avoiding storing this extra information -- what is > there to sort on that's there already? You'd have to infer a whole > bunch of things about the object types associated with pg_depend > entries to do that, and teach dependency.c about its callers. That > seems pretty brittle to me. This solution changes pg_depend relation for solve a problem, which exists only in regression tests. Very rarely it can be in the partitioning cases. Or is it not? I think this decision is some excessive. May be you consider another approach: 1. Order of dependencies in 'DROP ... CASCADE' case is a problem of test tools, not DBMS. And here we can use 'verbose terse'. 2. Print all dependencies in findDependentObjects() on a drop error (see attachment as a prototype). -- Andrey Lepikhov Postgres Professional https://postgrespro.com The Russian Postgres Company
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