Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCYdR-0004YN-Gx for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Dec 2016 21:11:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cCYdQ-0005RG-VA for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Dec 2016 21:11:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cCYc0-0003kd-6k for pgsql-hackers@postgresql.org; Thu, 01 Dec 2016 21:09:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cCYbt-0003Er-2Z for pgsql-hackers@postgresql.org; Thu, 01 Dec 2016 21:09:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uB1L9ahP013625; Thu, 1 Dec 2016 16:09:36 -0500 From: Tom Lane To: Jim Nasby cc: pgsql-hackers@postgresql.org Subject: Re: Wrong order of tests in findDependentObjects() In-reply-to: <23800.1480362490@sss.pgh.pa.us> References: <13224.1480177514@sss.pgh.pa.us> <5774.1480263301@sss.pgh.pa.us> <865865e1-7064-0319-e7ea-13b7fddad4f1@BlueTreble.com> <5219.1480352684@sss.pgh.pa.us> <23800.1480362490@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 28 Nov 2016 14:48:10 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13623.1480626576.1@sss.pgh.pa.us> Date: Thu, 01 Dec 2016 16:09:36 -0500 Message-ID: <13624.1480626576@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: >> Jim Nasby writes: >>> I can't think of any reason you'd want the current behavior. >> But I think fixing it to not recurse to extensions during temp namespace >> cleanup might not be very hard. I'll take a look. I wrote a test case to try to demonstrate that this patch was fixing a bug, and was surprised to find that it didn't fail. The reason turns out to be that we fixed this problem years ago in commit 08dd23cec: Also, arrange for explicitly temporary tables to not get linked as extension members in the first place, and the same for the magic pg_temp_nnn schemas that are created to hold them. This prevents assorted unpleasant results if an extension script creates a temp table: the forced drop at session end would either fail or remove the entire extension, and neither of those outcomes is desirable. Now, if you really try hard, say by creating a temp function, you can break it. But I don't have all that much sympathy for such use-cases. I think that the patch I wrote is good cleanup, so I'm still inclined to apply it in HEAD, but I no longer think it's fixing any case that's significant in the field. I wonder if you have a counterexample? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers