Foreign tables exist as empty shells on the local database, lending merely their structure for query-planning and data-fetching purposes. The foreign-data wrapper transforms data requests into something the remote server can understand and presents it in a way that PostgreSQL will recognize.
As we're using the postgres_fdw wrapper, the situation is simplified. A PostgreSQL server should have less trouble communicating with another PostgreSQL server than an Oracle server, for instance. Though this means less transformation, there are still limitations to what functionality a foreign table might provide compared to a local table.
In this recipe, we'll use a foreign table in a few scenarios and examine how it performs in each. We'll also explore some of the common caveats involved in foreign table access.