Re: Bug in pg_dump

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump
Date: 2015-03-01 21:27:22
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> * Michael Paquier (michael(dot)paquier(at)gmail(dot)com) wrote:
> > The thing is that we must absolutely wait for *all* the TableInfoData
> > of all the extensions to be created because we need to mark the
> > dependencies between them, and even my last patch, or even with what
> > you are proposing we may miss tracking of FK dependencies between
> > tables in different extensions. This has little chance to happen in
> > practice, but I think that we should definitely get things right.
> > Hence something like this query able to query all the FK dependencies
> > with tables in extensions is more useful, and it has no IN clause:
> Ah, yes, extensions can depend on each other and so this could
> definitely happen. The current issue is around postgis, which by itself
> provides three different extensions.
> > + appendPQExpBuffer(query,
> > + "SELECT conrelid, confrelid "
> > + "FROM pg_constraint "
> > + "LEFT JOIN pg_depend ON (objid = confrelid) "
> > + "WHERE contype = 'f' "
> > + "AND refclassid = 'pg_extension'::regclass "
> > + "AND classid = 'pg_class'::regclass;");
> I'm trying to figure out why this is a left join..?

Please see the latest version of this, attached. I've removed the left
join, re-used the 'query' buffer (instead of destroying and recreating
it), and added a bit of documentation, along with a note in the commit
message for the release notes.

Would be great if you could review it and let me know. As mentioned in
my other email, I'm happy to include the TAP test in master once we've
worked out the correct way to handle installing the extension for
testing in the Makefile system.



Attachment Content-Type Size
fix-pg_dump-extensions.patch text/x-diff 5.2 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-03-01 22:43:23 Re: Index-only scans for GiST.
Previous Message Stephen Frost 2015-03-01 20:28:37 Re: Odd behavior of updatable security barrier views on foreign tables