Re: DROP OWNED CASCADE vs Temp tables
Michael Paquier <[email protected]> Tue, 14 Jan 2020 09:19:38 +0900
| Newsgroups | gmane.comp.db.postgresql.bugs,gmane.comp.db.postgresql.devel.general |
|---|---|
| Message-ID | <[email protected]> |
--jCrbxBqMcLqd4mOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --jCrbxBqMcLqd4mOl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4dCRoACgkQnvQgOdby QH03Uw/6Aubn8HDhvznft2hso0n22Vv1CffJlLk5ttTxT65o6zXkDNdrapDDYLSU YwnbyB7HeG8AsrdPkuY0SGc9dqWBsJK+l+va+0UovBqr/bJ7Kc3emXgstrw3xnys aMNx8eXsX23l6EkjPEyKm+cwF5VlmJC7qCh0TvpKbGKY7d9Dc9+gqiNATxU+nCPi dNNdEza/6FayBfJotkwrXTlZcxr4aoZHrJK6IGEn2evOqY+brV3q67nGJCzdhdjb vO/phZYxMSTnG1DSA0FWuP5Uxk5wZG+i3c4TMtaZts6jfEzk6ioqNRI/YbpCj4P4 sARDKo6E63UAPhOc808dyX1OXfASVdT2AhrcAQ9t3hudNBoR0Yo8SA2r942/TAvp NgwwNKFJfki9yclTLhFYCzOjm0ONFInGx/bQz7H8PYGSYZohiHnkfW4ZgKJotu+A exOTQEAd/l11XSdR0g96NS7surBoHlR02WOCC63YU7+SKoZv8PYHA+hjYIYUQ0wY EGZI9R0ZNssEl09amBq7Zq50KrW3eaWdbfVgi72hOqjkjXeM10O62/fzs43EZmpR 7dmCjRBzuKkIqtZkbKm09+lUwwj3U1QafASK0gY20aUjlyEd+8WEqo4aZ6blnfrT 6xeBh3d3A9Lnas/smThnEuQEgNOSgaa1OBRW+YFO4y6HdUoHhv0= =xwmK -----END PGP SIGNATURE----- --jCrbxBqMcLqd4mOl--