Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdQN6-00062F-6u for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Aug 2016 23:17:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bdQN4-0001hs-NT for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Aug 2016 23:17:10 +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 1bdQLe-0008U2-Lz for pgsql-hackers@postgresql.org; Fri, 26 Aug 2016 23:15:42 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bdQLb-0000fU-AX for pgsql-hackers@postgresql.org; Fri, 26 Aug 2016 23:15:41 +0000 Received: by mail-wm0-x233.google.com with SMTP id o80so12088814wme.1 for ; Fri, 26 Aug 2016 16:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=vcdTrdodV3xxvya+q2VWrmiKb6ZHzEWcacL38vRuxyA=; b=nlF6PHfi1mrUQEbPe9v1bItEZetpVAfMh9IU3s4nTQgMYdbTGzY72rBkc6QOI0ckNC GP0+QgE/lRkAO/ywj697E79eksSItcnEg94wcGFz0jHG/1sr8KhNlZsy5UDNeGqQJnkM 389440uu3Y7lxsRKHTid/39catSSJAS442JyViP/N8XYf94xu6/ZtqLmB7nAfC55Ozm1 gK4fydCt0ECoV9UKFMyqADEOvH+vH+dwhys1M8s8TsVoeWJkTTw7cURrX8jua3b16lo2 YVetita4y9VmcfWKOUsF4PGLCmJCvA21vzPBMxKXOOSfUdllDKoR5W2PzXzfNhYyhaau YT7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=vcdTrdodV3xxvya+q2VWrmiKb6ZHzEWcacL38vRuxyA=; b=nGsZexvWTfJq/wFI1wCpKpEl371jaSk8zf0b+tFuG2EHJQt/eFtNJL13Ktf4zg+f84 qtJbvmMbpjkaFdZ/BUSQfZW3JZXvaUfT9Ix1inTS/QET7dgIpBlMHFejp9nt6f2oJu/S tSs4FCZvqhv+KvWrkNUOPuSZ5u9O6HcIMG8UtLNsbWctiQBV0QSU3aLCbFiSh0AoABd4 5Ms9sYk9vgvJW3pDFS2HOnaaKD5L8eleQkDahwkXpUAOQ1S85d4xAB3mKlcSABOL4k/Y YArxGdcfilv7oes123V9DabRp/I9TYCD6JRkZs2End7gxQQLT6NBBMsB3r5AJnjhpWOH 6Dlg== X-Gm-Message-State: AE9vXwOkUK33Jr7nJrwy+ICGu5fsb949NDHty+CKCEVCAWKl+H68jMcevG1gh9GwJUnSA4ZCbh5mhZSvyXZUBr2XRA5r1cRAqLx5f/C2F7Kka836J6qY6feV/oNkdbVsKa5dFeu4lE1F7iRllA2sQlld1QKKN+wyGqJ+/kh07bYY/ezIqlUb+/3qBPUq49wBFjt3LkBPLiq8 X-Received: by 10.28.17.9 with SMTP id 9mr880026wmr.73.1472253336418; Fri, 26 Aug 2016 16:15:36 -0700 (PDT) Received: from [10.137.2.17] (ip-89-177-44-58.net.upcbroadband.cz. [89.177.44.58]) by smtp.gmail.com with ESMTPSA id p71sm1114237wmf.9.2016.08.26.16.15.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Aug 2016 16:15:35 -0700 (PDT) Subject: Re: pg_dump with tables created in schemas created by extensions To: Tom Lane , =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= References: <99581032-71de-6466-c325-069861f1947d@2ndquadrant.com> <20160824141559.GO4028@tamriel.snowman.net> <31878.1472251073@sss.pgh.pa.us> Cc: Michael Paquier , Stephen Frost , PostgreSQL-development From: Tomas Vondra Message-ID: Date: Sat, 27 Aug 2016 01:15:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Thunderbird/46.0a2 MIME-Version: 1.0 In-Reply-To: <31878.1472251073@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 08/27/2016 12:37 AM, Tom Lane wrote: > =?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?= writes: >> Looking at this issue today, I found that we are not setting a >> dependency for an index created inside an extension. > > Surely the index has a dependency on a table, which depends on the > extension? > > If you mean that you want an extension to create an index on a table > that doesn't belong to it, but it's assuming pre-exists, I think > that's just stupid and we need not support it. > I don't see why that would be stupid (and I'm not sure it's up to us to just decide it's stupid). Imagine you use extensions to break the application into modules. You have a "basic" extension, with the table, and a "search" extension implementing fulltext search on top of that table. Isn't it natural to keep the gin indexes in the search extension? So the basic--1.0.sql will do something like CREATE TABLE x ( ...) and search--1.0.sql would do CREATE INDEX y ON x USING gin (z); CREATE FUNCTION search_objects(..) ... because the index and function doing the search are somewhat tightly coupled. I admit this is just an example and I don't know how many people use extensions this way, but I don't see why this would be inherently stupid pattern? I see the current behavior is documented, and I do understand why global objects can't be part of the extension, but for indexes it seems to violate POLA a bit. Is there a reason why we don't want the extension/index dependencies? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers