postgres_fdw

A foreign data wrapper for connecting PostgreSQL databases

postgres_fdw is a foreign data wrapper provided as a contrib module for connecting PostgreSQL databases.

postgres_fdw was added in PostgreSQL 9.3.

Source code

postgres_fdw source is located at contrib/postgres_fdw/.

Change history

  • PostgreSQL 13
    • options sslkey and sslcert added at server and user mapping level to enable different users to authenticate with different certificates (commit f5fd995a)
    • passwordless non-superuser connections permitted, mainly to facilitate passwordless SSL authentication (commit 6136e94d)
  • PostgreSQL 12
    • expand the number of cases where ORDER BY sorts and LIMIT clauses can be pushed to remote servers (commits d50d172e and ffab494a)
    • Improve optimizer cost accounting for postgres_fdw queries (commits 08d2d58a, 8b6da83d and edbcbe27)
    • Properly honour WITH CHECK OPTION on views that reference postgres_fdw tables (a45adc74)
  • PostgreSQL 11
    • support for pushing down partition-level aggregates to partitioned tables added (commit 7e0d64c7)
    • support for pushing UPDATEs and DELETEs using joins to foreign tables added (commit 1bc0100d)
    • support for COPY and foreign partition routing added (commit 3d956d95)
  • PostgreSQL 10
    • aggregate functions can be pushed to the remote server (commit 7012b132)
    • additional types of join can be pushed to the remote server (commits b30fb56b and 332bec1e)
    • OID columns will now be fetched from the remote server (commits ae025a15)
  • PostgreSQL 9.6
    • basic support added for remote joins (commits e4106b25 and aa09cd24)
    • support added for remote sorts (commits f18c944b and ccd8f979)
    • support added for directly modifying foreign tables with remote UPDATEs, and DELETEs (commit 0bf3ae88)
    • the fetch_size option can now be applied to individual tables as well as the foreign server (commit dc203dc3)
    • query cancellation requests will be transmitted to the remote server (commits f039eaac and 1b812afb)
    • user mappings which map to the same user on the remote server will be consolidated into a single remote connection (commit 96198d94)
    • extension functions and operators, if specified in the extensions option, can be pushed down to the remove server (commit d8949416)
  • PostgreSQL 9.4
    • extended pushdown of VARCHAR columns through improved handling of collation-related decisions (commit 76f965ff)
  • PostgreSQL 9.3

Examples

For an example of a postgres_fdw setup, see the entry "foreign table".

Categories

Contrib module, Data import/export, Foreign Data Wrapper (FDW)

See also

dblink, file_fdw