FDWs aren't really that layperson-friendly: to set one up, you need to run a lot of SQL boilerplate like CREATE FOREIGN SERVER, CREATE USER MAPPING and CREATE FOREIGN TABLE. We wanted to make them more accessible through our sgr mount [2] command and snapshottable via Splitfiles (e.g. [3]).
The point about data types changing is also a good one. Where the foreign data wrapper doesn't implement IMPORT FOREIGN SCHEMA [4] through introspection on the foreign database side, you have to enumerate all columns and types in CREATE FOREIGN TABLE. If a column on the remote table goes away, the FDW might still query it and cause runtime errors.
[0] https://wiki.postgresql.org/wiki/Future_of_storage
[1] https://github.com/citusdata/postgres_vectorization_test
[2] https://www.splitgraph.com/docs/sgr/data-import-export/mount
[3] https://www.splitgraph.com/docs/ingesting-data/socrata#split...
[4] https://www.postgresql.org/docs/current/sql-importforeignsch...
At its simplest, the FDW can just return all tuples from the remote database without filtering them (letting the local DB run filtering). But more advanced FDWs like postgres_fdw[0] can push down qualifiers and joins to the remote database. postgres_fdw even runs EXPLAIN on the remote instance and parses its output -- essentially letting the local and the foreign query planners collaborate on execution.
[0] https://www.postgresql.org/docs/current/postgres-fdw.html#id...
I mean I love FDWs, especially how easy it is to write one... But this is an issue I've run into.
For a lot of people that’s probably not a net negative.
Something like this has happened to me when reading from a csv file.
In this case pg will show an error and not read any rows from the fdw.