These patches extend the compatibility of pg_dump
with foreign data wrappers for PostgreSQL 13 (it can easily be
adapted for Postgres versions 11 and 12).
Now data in FDW backed tabled can be optionally dumped and the ALTER TABLE
commands on foreign tables are written as
ALTER FOREIGN TABLE
.
To compile and use the patch follow these instructions:
- Get the PostgreSQL source code, for example via
git clone https://github.com/postgres/postgres.git --depth=1
orapt-get source postgresql-11
andsudo apt-get build-dep postgresql-11
- Apply these patches with e.g.:
patch -p1 < somepatch
- Compile PostgreSQL
The related threads in the PostgreSQL hackers mail list are: