Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TFyWm-0006D1-BR for pgsql-bugs@postgresql.org; Mon, 24 Sep 2012 02:36:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TFyWk-0001rl-Ud for pgsql-bugs@postgresql.org; Mon, 24 Sep 2012 02:36:07 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8O2a0v7015239; Sun, 23 Sep 2012 22:36:01 -0400 (EDT) From: Tom Lane To: Dimitri Fontaine cc: Alvaro Herrera , Bruce Momjian , jeff , Pg Bugs Subject: Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations In-reply-to: References: <26225.1340419030@sss.pgh.pa.us> <20120830214826.GC32350@momjian.us> <1347454709-sup-1105@alvh.no-ip.org> Comments: In-reply-to Dimitri Fontaine message dated "Thu, 13 Sep 2012 18:41:19 +0200" Date: Sun, 23 Sep 2012 22:36:00 -0400 Message-ID: <15238.1348454160@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/251 X-Sequence-Number: 34245 Dimitri Fontaine writes: > Dimitri Fontaine writes: >> I think we shouldn't change the content of pg_depend lightly here, and > So here's a patch following that idea. I've got to say that I think this is fundamentally the wrong approach: rather than fixing the generic problem of ALTER EXTENSION not coping with multiple dependency paths to the same object, it hacks the specific case of owned sequences, and what's more it does that by assuming that every owned sequence *will* have a dependency on the extension. That's not a safe assumption. Still, this might be the best approach for the back branches, given that we do not know of any existing multiple-dependency scenarios other than the owned-sequence case. A real fix is looking mighty invasive. > Even for TIP I don't want us to change how pg_depend tracking is done, Agreed. Quite aside from backwards-compatibility concerns, I think that trying to avoid multiple dependency paths is doomed to failure. regards, tom lane