Re: Option to dump foreign data in pg_dump

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>, Luis Carril <luis(dot)carril(at)swarm64(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Option to dump foreign data in pg_dump
Date: 2019-11-11 20:04:17
Message-ID: 17df7a57b84f167b2fe1b15b80f08d9ac299e10e.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2019-11-09 at 21:38 +0100, Daniel Gustafsson wrote:
> I took a look at this patch again today for a review of the latest version.
> While I still think it's a potential footgun due to read-only FDW's, I can see
> usecases for having it so I'm mildly +1 on adding it.

I don't feel good about this feature.
pg_dump should not dump any data that are not part of the database
being dumped.

If you restore such a dump, the data will be inserted into the foreign table,
right? Unless someone emptied the remote table first, this will add
duplicated data to that table.
I think that is an unpleasant surprise. I'd expect that if I drop a database
and restore it from a dump, it should be as it was before. This change would
break that assumption.

What are the use cases of a dump with foreign table data?

Unless I misunderstood something there, -1.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2019-11-11 20:11:35 Re: Monitoring disk space from within the server
Previous Message Antonin Houska 2019-11-11 19:57:35 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)