influxdb_fdw
influxdb_fdw · Foreign data wrapper for querying InfluxDB from PostgreSQL.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100098 | influxdb_fdw | influxdb_fdw | 1.3 | FDW | PostgreSQL | C |
PostgreSQL · 13, 14, 15, 16, 17
Usage
Sources:
influxdb_fdw 1.3 exposes InfluxDB measurements as PostgreSQL foreign tables. The reviewed upstream matrix covers PostgreSQL 13 through 17, InfluxDB 1.8, and InfluxDB 2.7 through its v1 compatibility API. Supported operations include reads, inserts, deletes, schema import, and several query pushdowns; TRUNCATE is not supported.
Define a foreign server and table
The server below targets an InfluxDB 1.x database. Store remote credentials in a separately managed user mapping with the least required privilege rather than in application SQL or logs.
InfluxDB 2.x requires the C++ client path, version '2', and an auth_token user-mapping option. Protect PostgreSQL catalogs and backups that contain user mappings. In schemaless mode a foreign table has fixed time, tags, and fields columns, with the last two represented as jsonb.
Semantic and operational boundaries
InfluxDB can omit rows containing null fields when the remote target list names specific fields, while a remote SELECT * can return them. Consequently, changing the PostgreSQL projection may change which rows are visible. Inspect EXPLAIN VERBOSE and compare results against native InfluxDB queries before depending on pushdown behavior.
Writes cross a foreign-system boundary and do not acquire PostgreSQL’s local transactional guarantees. Treat retries, partial failures, time precision, retention policy, and remote authentication as application-level concerns. The time column uses microsecond precision; time_text is available when nanosecond text representation is required. Validate the exact PostgreSQL, client-library, and InfluxDB combination because the reviewed compatibility matrix does not establish support beyond PostgreSQL 17.