Re: Option to dump foreign data in pg_dump - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Option to dump foreign data in pg_dump
Date
Msg-id 17df7a57b84f167b2fe1b15b80f08d9ac299e10e.camel@cybertec.at
Whole thread Raw
In response to Option to dump foreign data in pg_dump  (Luis Carril <luis.carril@swarm64.com>)
Responses Re: Option to dump foreign data in pg_dump  (Luis Carril <luis.carril@swarm64.com>)
List 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




pgsql-hackers by date:

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