pgc_fdw
pgc_fdw · Access remote PostgreSQL tables through a postgres_fdw-derived wrapper with a FoundationDB-backed query cache
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100457 | pgc_fdw | pgc_fdw | 1.0 | FDW | Apache-2.0 | C |
PostgreSQL · 12
Usage
Sources:
pgc_fdw is an old fork of postgres_fdw that caches remote query results in FoundationDB. It creates a foreign data wrapper named pgc_fdw, so it can coexist with the core postgres_fdw, but it tracks an old PostgreSQL source tree and should be treated as experimental.
Create a Cached Foreign Table
FoundationDB server and client libraries must be installed, and the PostgreSQL operating-system account must be able to use the default FoundationDB cluster file.
cache_timeout is valid on a server or foreign table, is measured in seconds, defaults to 3600, and can be set to 0 to disable caching. Negative values are rejected.
Cache Operations and Risks
pgc_fdw_cache_info() reports sha, timestamp, tuple count, and query. The extension also exposes low-level pgc_fdw_set() and pgc_fdw_watch() functions. Revoke cache mutation functions from PUBLIC unless callers explicitly need them.
Cached reads can remain stale for the full timeout, and the extension provides no general invalidation link to remote writes. Test transaction visibility, failover, FoundationDB outages and limits, credential handling, cache-key isolation, and manual invalidation. Because the fork depends on PostgreSQL internals and starts FoundationDB networking in each loading backend, build and stress-test it only against the exact PostgreSQL/FoundationDB combination intended for deployment.