Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ir9w6-000753-HU for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Jan 2020 00:19:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ir9w5-0003QP-BI for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Jan 2020 00:19:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ir9w3-0003Q5-JM; Tue, 14 Jan 2020 00:19:57 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ir9vv-0002HB-Ac; Tue, 14 Jan 2020 00:19:55 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 2AE9D614; Mon, 13 Jan 2020 19:19:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 13 Jan 2020 19:19:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=uBHvsqlGTv0b5QimFME5/XSMwwl hiFQ+ty6l1f8oLkM=; b=h5jU3dQJmdRl99ndd3d7bmahxgl+vE0s5OG/GwvBr7M 7FCke1AW4rzZdoDhcYhfNBUOwoeeVu71yriFSizKZCI7B+5Xa83v3GIUmLDrZloL tPBen+R7PXILXd7dwxtnxjor20aLxyvIqlj0maJT4ab4Fo3Ck5cycYfjdAtZDkRo 31CN5faTBHZCP4EqM2eZQPI4hlh0MTjhW+JQ9OJVrjo1AzlqvDOBvoWVuIRhD2b4 1eYFJsiaSGYdxbEVV9Lpc+neuDwJ38Na73jAv+TYRgdlpJEYHGwFhJZuUdFOyTEu 3iRw2txh06w+RxH1kZLQwjP/fYmLHX1iYCcjWgqouDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=uBHvsq lGTv0b5QimFME5/XSMwwlhiFQ+ty6l1f8oLkM=; b=uDnD2chShfvzuVfyPRq53S 28FUGmeizFhxIRinqhx2Aytp9ZCPXuk13Zwshfxie7MqnjENYpH0CKIfFq1TW+2l QUSqzGAl3qN5lZ2g+WdS48NHSpT8x5NjvVch4v1MJBZjTLAnJzr94/HLtj7eduSc E1HE7xT9XXoi0wDb6ljlt6vZcUW6SrISJ9Ph07Bo+KTnqY1s78NzjEAEoDiIKvrP /9rOQ5HTH+g8QuFLZamXSAqZ7aASAZwtQIOQ4qi7UEmnIApasAGNo6S8Wji8ynTS xi6XLsuQALRh+VU2oTZHgCr3pYrfFuOT/HVatitZYvDYdEhDq5C17GsfMJFCfHQw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdejuddgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 180018005B; Mon, 13 Jan 2020 19:19:41 -0500 (EST) Date: Tue, 14 Jan 2020 09:19:38 +0900 From: Michael Paquier To: Alvaro Herrera Cc: Mithun Cy , PostgreSQL Hackers , PostgreSQL mailing lists Subject: Re: DROP OWNED CASCADE vs Temp tables Message-ID: <20200114001938.GD1515@paquier.xyz> References: <20200113224506.GA5833@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jCrbxBqMcLqd4mOl" Content-Disposition: inline In-Reply-To: <20200113224506.GA5833@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --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--