Re: Bug in pg_dump

From: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump
Date: 2015-02-27 15:29:11
Message-ID: 54F08D47.90000@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 26/02/2015 12:41, Michael Paquier a écrit :
> On Wed, Feb 25, 2015 at 7:46 AM, Gilles Darold <gilles(dot)darold(at)dalibo(dot)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.

Works great too. I'm agree that this patch should be backported but I
think we need to warn admins in the release note that their
import/restore scripts may be broken.

One of the common workaround about this issue was to not take care of
the error during data import and then reload data from the tables with
FK errors at the end of the import. If the admins are not warned, this
can conduct to duplicate entries or return an error.

--
Gilles Darold
Consultant PostgreSQL
http://dalibo.com - http://dalibo.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Urbański 2015-02-27 15:29:21 Re: GSoC idea - Simulated annealing to search for query plans
Previous Message Marc Cousin 2015-02-27 14:27:10 Re: star schema and the optimizer