Re: Option to dump foreign data in pg_dump

David Steele <david@pgmasters.net>

From: David Steele <david@pgmasters.net>
To: Luis Carril <luis.carril@swarm64.com>, vignesh C <vignesh21@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Daniel Gustafsson <daniel@yesql.se>, Laurenz Albe <laurenz.albe@cybertec.at>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-03-03T19:11:41Z
Lists: pgsql-hackers
Hi Luis,

On 1/29/20 11:05 AM, Peter Eisentraut wrote:
> On 2020-01-21 10:36, Luis Carril wrote:
>>> Yes we can support --include-foreign-data without parallel option and
>>> later add support for parallel option as a different patch.
>>
>> Hi,
>>
>>      I've attached a new version of the patch in which an error is 
>> emitted if the parallel backup is used with the --include-foreign-data 
>> option.
> 
> This seems like an overreaction.  The whole point of 
> lockTableForWorker() is to avoid deadlocks, but foreign tables don't 
> have locks, so it's not a problem.  I think you can just skip foreign 
> tables in lockTableForWorker() using the same logic that getTables() uses.
> 
> I think parallel data dump would be an especially interesting option 
> when using foreign tables, so it's worth figuring this out.

What do you think of Peter's comment?

Regards,
-- 
-David
david@pgmasters.net



Commits

  1. pg_dump: Allow dumping data of specific foreign servers