Thread: Should partial dumps include extensions?

Should partial dumps include extensions?

From
Tom Lane
Date:
There's a complaint here
http://archives.postgresql.org/pgsql-general/2011-05/msg00714.php
about the fact that 9.1 pg_dump always dumps CREATE EXTENSION commands
for all loaded extensions.  Should we change that?  A reasonable
compromise might be to suppress extensions in the same cases where we
suppress procedural languages, ie if --schema or --table was used
(see "include_everything" switch in pg_dump.c).
        regards, tom lane


Re: Should partial dumps include extensions?

From
Robert Haas
Date:
On Tue, May 24, 2011 at 4:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> There's a complaint here
> http://archives.postgresql.org/pgsql-general/2011-05/msg00714.php
> about the fact that 9.1 pg_dump always dumps CREATE EXTENSION commands
> for all loaded extensions.  Should we change that?  A reasonable
> compromise might be to suppress extensions in the same cases where we
> suppress procedural languages, ie if --schema or --table was used
> (see "include_everything" switch in pg_dump.c).

Making it work like procedural languages seems sensible to me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Should partial dumps include extensions?

From
Peter Eisentraut
Date:
On tis, 2011-05-24 at 23:26 -0400, Robert Haas wrote:
> On Tue, May 24, 2011 at 4:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > There's a complaint here
> > http://archives.postgresql.org/pgsql-general/2011-05/msg00714.php
> > about the fact that 9.1 pg_dump always dumps CREATE EXTENSION commands
> > for all loaded extensions.  Should we change that?  A reasonable
> > compromise might be to suppress extensions in the same cases where we
> > suppress procedural languages, ie if --schema or --table was used
> > (see "include_everything" switch in pg_dump.c).
> 
> Making it work like procedural languages seems sensible to me.

The same problem still exists for foreign data wrappers, servers, and
user mappings.  It should probably be changed in the same way.



Re: Should partial dumps include extensions?

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> On tis, 2011-05-24 at 23:26 -0400, Robert Haas wrote:
>> On Tue, May 24, 2011 at 4:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> There's a complaint here
>>> http://archives.postgresql.org/pgsql-general/2011-05/msg00714.php
>>> about the fact that 9.1 pg_dump always dumps CREATE EXTENSION commands
>>> for all loaded extensions.  Should we change that?  A reasonable
>>> compromise might be to suppress extensions in the same cases where we
>>> suppress procedural languages, ie if --schema or --table was used
>>> (see "include_everything" switch in pg_dump.c).

>> Making it work like procedural languages seems sensible to me.

> The same problem still exists for foreign data wrappers, servers, and
> user mappings.  It should probably be changed in the same way.

No objection here, but I'm not going to go do it ...
        regards, tom lane