Re: DROP OWNED CASCADE vs Temp tables
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Mithun Cy <mithun.cy@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-01-14T00:19:38Z
Lists: pgsql-bugs, pgsql-hackers
On Mon, Jan 13, 2020 at 07:45:06PM -0300, Alvaro Herrera wrote: > This seems fiddly to handle better; maybe you'd have to have a new > PERFORM_DELETION_* flag that says to ignore "missing" objects; so when > you go from shdepDropOwned, you pass that flag all the way down to > doDeletion(), so the objtype-specific function is called with > "missing_ok", and ignore if the object has already gone away. That's > tedious because none of the Remove* functions have the concept of > missing_ok. Yes, that would be invasive and I'd rather not backpatch such a change but I don't see a better or cleaner way to handle that correctly either than the way you are describing. Looking at all the subroutines removing the objects by OID, a patch among those lines is repetitive, though not complicated to do. -- Michael
Commits
-
Heed lock protocol in DROP OWNED BY
- 91d97462c96e 9.5.22 landed
- 5be594caf818 13.0 landed
- 59273a7cec34 11.8 landed
- 4d21263fffd2 10.13 landed
- 2eea49471fba 12.3 landed
- 2bf56f50ebb0 9.6.18 landed