Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRmTx-00007B-1e for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Jan 2017 21:00:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRmTv-00034T-KJ for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Jan 2017 21:00:23 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cRmTv-00034M-3o for pgsql-bugs@postgresql.org; Thu, 12 Jan 2017 21:00:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cRmTm-0003Iz-84 for pgsql-bugs@postgresql.org; Thu, 12 Jan 2017 21:00:22 +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 v0CL0BCn018076; Thu, 12 Jan 2017 16:00:11 -0500 From: Tom Lane To: Moshe Jacobson cc: Stephen Frost , daniele.varrazzo@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension In-reply-to: References: <20161208191642.1407.30751@wrigleys.postgresql.org> <20161208192933.GG23417@tamriel.snowman.net> <20170112183457.GJ18360@tamriel.snowman.net> <12559.1484247701@sss.pgh.pa.us> Comments: In-reply-to Moshe Jacobson message dated "Thu, 12 Jan 2017 19:10:29 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18074.1484254811.1@sss.pgh.pa.us> Date: Thu, 12 Jan 2017 16:00:11 -0500 Message-ID: <18075.1484254811@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Moshe Jacobson writes: > On Thu, Jan 12, 2017 at 2:01 PM Tom Lane wrote: >> I think this scenario is simply pilot error, or at least gross abuse of >> the extension system. If you dump and reload a DB containing an extension, >> the extension definition that's fetched by CREATE EXTENSION is expected >> to define (at least) all the objects that belonged to the extension in the >> old DB. You can't just randomly ALTER EXTENSION and not update the >> extension definition script to match. > The reason I add the dynamically-created tables to the extension is so that > they are never included in the pg_dump output. If this is a gross abuse of > the extension system, is there another way you can suggest to mark these > tables as not-to-be-dumped? The extension mechanism definitely isn't meant to do that ;-). Maybe you could put these not-to-dump tables in their own schema and exclude that schema from pg_dump with -N? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs