Re: Option to dump foreign data in pg_dump

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Luis Carril <luis(dot)carril(at)swarm64(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Option to dump foreign data in pg_dump
Date: 2020-01-29 16:05:13
Message-ID: 2a15ed10-77e3-5885-a247-e65b9e5e8407@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2020-01-29 17:08:35 Re: [Proposal] Global temporary tables
Previous Message Robert Haas 2020-01-29 15:55:10 Re: making the backend's json parser work in frontend code