From: Tom Lane <tgl@sss.pgh.pa.us>
To: Moshe Jacobson <moshe@neadwerx.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: daniele.varrazzo@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension
Date: Thu, 12 Jan 2017 16:00:11 -0500
Message-ID: <18075.1484254811@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJ4CxLmkmPmv8ujTU78ak3zqq01FMppxcooQHZHxSh8NUq014A@mail.gmail.com>
References: <20161208191642.1407.30751@wrigleys.postgresql.org>
<20161208192933.GG23417@tamriel.snowman.net>
<CAJ4CxLmGST-UkYzhrS-QbXLoXeYnZPPO7m7b9U=2RRr-cTArHQ@mail.gmail.com>
<20170112183457.GJ18360@tamriel.snowman.net>
<CAJ4CxLk8iAsLVgmv2NAWNoKD3cA+pqJ0UmB9=135DsJzcfEXOg@mail.gmail.com>
<12559.1484247701@sss.pgh.pa.us>
<CAJ4CxLmkmPmv8ujTU78ak3zqq01FMppxcooQHZHxSh8NUq014A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Moshe Jacobson <moshe@neadwerx.com> writes:
> On Thu, Jan 12, 2017 at 2:01 PM Tom Lane <tgl@sss.pgh.pa.us> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, moshe@neadwerx.com, sfrost@snowman.net, daniele.varrazzo@gmail.com
Subject: Re: BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension
In-Reply-To: <18075.1484254811@sss.pgh.pa.us>
References: <20161208191642.1407.30751@wrigleys.postgresql.org> <20161208192933.GG23417@tamriel.snowman.net> <CAJ4CxLmGST-UkYzhrS-QbXLoXeYnZPPO7m7b9U=2RRr-cTArHQ@mail.gmail.com> <20170112183457.GJ18360@tamriel.snowman.net> <CAJ4CxLk8iAsLVgmv2NAWNoKD3cA+pqJ0UmB9=135DsJzcfEXOg@mail.gmail.com> <12559.1484247701@sss.pgh.pa.us> <CAJ4CxLmkmPmv8ujTU78ak3zqq01FMppxcooQHZHxSh8NUq014A@mail.gmail.com> <18075.1484254811@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox