Re: Option to dump foreign data in pg_dump
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Daniel Gustafsson <daniel@yesql.se>, Luis Carril
<luis.carril@swarm64.com>
Cc: vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-11T20:04:17Z
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
Commits
-
pg_dump: Allow dumping data of specific foreign servers
- 2f9eb3132094 13.0 landed