Skip to content

blackhole_fdw

Black-hole foreign tables that discard writes and return no rows

blackhole_fdw · Black-hole foreign tables that discard writes and return no rows

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102053blackhole_fdwblackhole_fdw0.0.1FDWPostgreSQLC

Usage

Sources:

blackhole_fdw is Andrew Dunstan’s standalone FDW teaching skeleton and an intentional data sink. It discards inserted rows, treats updates and deletes as no-ops, and returns an empty result set. Never use it for data that must be retained.

Core Workflow

After installing the library and extension SQL, an administrator can create a sink table. A successful insert does not mean the row was stored.

CREATE EXTENSION blackhole_fdw;
CREATE SERVER sink FOREIGN DATA WRAPPER blackhole_fdw;
CREATE FOREIGN TABLE discarded (id integer, payload text) SERVER sink;
INSERT INTO discarded VALUES (1, 'intentionally discarded');
SELECT * FROM discarded;

Development Boundary

The author presents the implementation as a starting point for FDW development, including scan and modification callbacks. The control version is 0.0.1, with relocatable SQL objects and no documented preload requirement. The source does not provide a current tested PostgreSQL-major matrix. The canonical upstream is Bitbucket; the GitHub import is a mirror. Treat this as demonstration infrastructure with deliberate data loss, not an archival or replication mechanism.

Table reader