On a recent project at Hashrocket, we had to use dblink in production as part of our set up for communicating with a legacy database. While our overall experience was positive, we had a couple of hiccups along the way. Let's talk about the lessons we learned! What is dblink? dblink is a Postgres command that allows you to connect to and execute queries on a remote database. There are a number of dblink-related commands in Postgres depending on your use case (from dblink_connect to dblink_exec...