
PostgreSQL Foreign Data Wrappers - onderkalaci
https://www.kentik.com/postgresql-foreign-data-wrappers/?utm_source=postgresweekly&utm_medium=email
======
mason55
Just be careful with FDWs. They run outside of many of the normal checks
within the PG server and so a badly written FDW can actually cause the whole
server to crash. We've experienced a number of issues with the MongoDB FDW
from Citus where we do benign things like comparing an integer to a string and
the entire Postgres server goes down. Another issues we've run into is that
the query planning cache seems to get confused by FDWs, and if we try to query
an FDW from within a stored procedure it just never returns or it crashes the
DB. Instead we have to construct the query with dynamic SQL inside the stored
proc which is both a pain in the ass and way increases the chances for bugs.

We're still on 9.1 so maybe some of this has been fixed by now but people seem
to push FDWs as this panacea where you get all the guarantees & safety of
running within Postgres and that's just not the case.

~~~
avifreedman
Good advice...

In our case (@kentik), we're mainly focused on having a Dremel-like system
accessible via FDW. Primarily we're using Postgres as the "API" to it, so if
it dies as a result of an FDW bug it'd be a primary operational problem for
us.

------
simonpantzare
[http://multicorn.org/](http://multicorn.org/) is a PostgreSQL extension meant
to make FDW development easier. It lets you write them in Python.

------
danr4
Unrelated but important: I wish sites realized that blocking Adobe Typekit
(and it's tracking) totally breaks their site. In this particular one I don't
see any text. Why the hell is there no fallback for crappy fonts or whatever?

~~~
qooleot
Hey I thought I'd reply here on the topic of the blog's usability to not
hijack the whole thread....but I still wanted to help the author out with a
quick fix:

This text's link doesn't work:

(see [http://www.whitedb.org](http://www.whitedb.org)).

------
brightball
Heroku's implemented a streamlined version that they support called Data
Links. [https://blog.codeship.com/heroku-data-links-postgres-
redis/](https://blog.codeship.com/heroku-data-links-postgres-redis/)

