Re: Bug in pg_dump - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Bug in pg_dump
Date
Msg-id 20150228150132.GI29780@tamriel.snowman.net
Whole thread Raw
In response to Re: Bug in pg_dump  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Michael, all,

* Michael Paquier (michael.paquier@gmail.com) wrote:
> On Wed, Feb 25, 2015 at 7:46 AM, Gilles Darold <gilles.darold@dalibo.com> wrote:
> > This is a far better patch and the test to export/import of the
> > postgis_topology extension works great for me.
> >
> > Thanks for the work.
>
> Attached is a patch that uses an even better approach by querying only
> once all the FK dependencies of tables in extensions whose data is
> registered as dumpable by getExtensionMembership(). Could you check
> that it works correctly? My test case passes but an extra check would
> be a good nice. The patch footprint is pretty low so we may be able to
> backport this patch easily.

I've started looking at this and it looks pretty simple and definitely
something to backpatch (and mention in the release notes that existing
pg_dump exports might be broken..).

One thing that might be missing is what Jim brought up though- that this
won't be able to deal with circular dependencies.  I'm not sure that we
need to care, but I *do* think we should document that in the extension
documentation as unsupported.  Perhaps in the future we can improve on
this situation by setting up to drop and recreate the constraints,
though another thought I had was to require extensions with circular
dependencies to use deferrable constraints and then make sure we set
constraints to deferred.  That isn't something we'd want to backpatch
though, so my plan is to push forward with this.
Thanks!
    Stephen

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Strange assertion using VACOPT_FREEZE in vacuum.c
Next
From: Stephen Frost
Date:
Subject: Re: Bug in pg_dump