pg_logical_ddl
pg_logical_ddl · Experimental DDL replication implementation for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101576 | pg_logical_ddl | pg_logical_ddl | 1.0 | ETL | Unknown | C |
Usage
Sources:
- Official upstream README
- Official extension control file (pg_logical_ddl.control)
- Official implementation source
pg_logical_ddl — Experimental DDL replication implementation for PostgreSQL. Use it when moving, transforming, or integrating the corresponding data from PostgreSQL. Upstream explicitly says it is not production-ready.
Core Workflow
Build PostgreSQL with the upstream-linked, in-progress apply-worker message patch. Install the library, preload it on both publisher and subscriber, and restart both servers:
On the publisher, select the DDL command tags to capture:
Create normal logical replication objects, enabling message delivery on the subscription:
DDL executed on the publisher is written as a logical message and re-executed by the subscriber apply worker with the captured role and search_path.
Important Setting
pg_logical_ddl.log_command_tagsis a case-insensitive comma-separated list. Its empty default disables DDL capture.
Requirements and Caveats
- The reviewed control, registry, or catalog evidence identifies version
1.0. - The control file marks the extension as relocatable.
- Upstream explicitly says the project is not production-ready.
- Upstream labels part or all of the project experimental.
- Upstream describes the project as a proof of concept.
- The required core patch and
message = truesubscription option are not available in a released PostgreSQL version. - There is no loop prevention. Keep capture disabled on the subscriber and use one-directional replication.
- DDL text is replayed at statement level. Environment-dependent names, functions, permissions, and
search_pathcontents can diverge. - Only plain
CREATE TABLEis automatically registered with the subscription in the reviewed implementation.