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 1gkG6S-0003Ew-82 for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jan 2019 22:25:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gkG6R-0005pk-0T for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jan 2019 22:25:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkG6Q-0005pX-Li for pgsql-hackers@lists.postgresql.org; Thu, 17 Jan 2019 22:25:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkG6O-0002N5-AG for pgsql-hackers@postgresql.org; Thu, 17 Jan 2019 22:25:33 +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 x0HMPRAY017114; Thu, 17 Jan 2019 17:25:27 -0500 From: Tom Lane To: Alvaro Herrera cc: Peter Geoghegan , PostgreSQL Hackers Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages) In-reply-to: <201901172215.plncg34crv3b@alvherre.pgsql> References: <201901172215.plncg34crv3b@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 17 Jan 2019 19:15:54 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17112.1547763927.1@sss.pgh.pa.us> Date: Thu, 17 Jan 2019 17:25:27 -0500 Message-ID: <17113.1547763927@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Jan-17, Tom Lane wrote: >> DEPENDENCY_INTERNAL_AUTO, however, broke this completely, as the code >> has no hesitation about making multiple entries of that kind. After >> rather cursorily looking at that code, I'm leaning to the position >> that DEPENDENCY_INTERNAL_AUTO is broken-by-design and needs to be >> nuked from orbit. In the cases where it's being used, such as >> partitioned indexes, I think that probably the right design is one >> DEPENDENCY_INTERNAL dependency on the partition master index, and >> then one DEPENDENCY_AUTO dependency on the matching partitioned table. > As I recall, the problem with that approach is that you can't drop the > partition when a partitioned index exists, because it follows the link > to the parent index and tries to drop that. Hm. Still, I can't believe that it's appropriate for a partitioned index to have exactly the same kind of dependency on the master index as it does on the associated table. regards, tom lane