logical_ddl

logical_ddl

logical_ddl : Replicate supported DDL changes over PostgreSQL logical replication

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
9530
logical_ddl
logical_ddl
0.1.0
ETL
MIT
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d--
No
Yes
No
Yes
no
no
Relationships
Schemaslogical_ddl

Pigsty carries the upstream RAISE WARNING typo fix for 0.1.0.

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
0.1.0
18
17
16
15
14
logical_ddl-
RPM
PIGSTY
0.1.0
18
17
16
15
14
logical_ddl_$v-
DEB
PIGSTY
0.1.0
18
17
16
15
14
postgresql-$v-logical-ddl-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el8.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el9.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el9.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el10.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el10.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d12.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d12.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d13.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d13.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u22.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u22.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u24.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u24.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PackageVersionOSORGSIZEFile URL
logical_ddl_180.1.0el8.x86_64pigsty17.1 KiBlogical_ddl_18-0.1.0-1PIGSTY.el8.x86_64.rpm
logical_ddl_180.1.0el8.aarch64pigsty17.3 KiBlogical_ddl_18-0.1.0-1PIGSTY.el8.aarch64.rpm
logical_ddl_180.1.0el9.x86_64pigsty17.0 KiBlogical_ddl_18-0.1.0-1PIGSTY.el9.x86_64.rpm
logical_ddl_180.1.0el9.aarch64pigsty17.1 KiBlogical_ddl_18-0.1.0-1PIGSTY.el9.aarch64.rpm
logical_ddl_180.1.0el10.x86_64pigsty17.2 KiBlogical_ddl_18-0.1.0-1PIGSTY.el10.x86_64.rpm
logical_ddl_180.1.0el10.aarch64pigsty17.3 KiBlogical_ddl_18-0.1.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-logical-ddl0.1.0d12.x86_64pigsty15.3 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-18-logical-ddl0.1.0d12.aarch64pigsty15.3 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-18-logical-ddl0.1.0d13.x86_64pigsty15.3 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~trixie_amd64.deb
postgresql-18-logical-ddl0.1.0d13.aarch64pigsty15.3 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~trixie_arm64.deb
postgresql-18-logical-ddl0.1.0u22.x86_64pigsty16.0 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~jammy_amd64.deb
postgresql-18-logical-ddl0.1.0u22.aarch64pigsty16.1 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~jammy_arm64.deb
postgresql-18-logical-ddl0.1.0u24.x86_64pigsty16.0 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~noble_amd64.deb
postgresql-18-logical-ddl0.1.0u24.aarch64pigsty15.7 KiBpostgresql-18-logical-ddl_0.1.0-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
logical_ddl_170.1.0el8.x86_64pigsty17.1 KiBlogical_ddl_17-0.1.0-1PIGSTY.el8.x86_64.rpm
logical_ddl_170.1.0el8.aarch64pigsty17.3 KiBlogical_ddl_17-0.1.0-1PIGSTY.el8.aarch64.rpm
logical_ddl_170.1.0el9.x86_64pigsty17.0 KiBlogical_ddl_17-0.1.0-1PIGSTY.el9.x86_64.rpm
logical_ddl_170.1.0el9.aarch64pigsty17.1 KiBlogical_ddl_17-0.1.0-1PIGSTY.el9.aarch64.rpm
logical_ddl_170.1.0el10.x86_64pigsty17.2 KiBlogical_ddl_17-0.1.0-1PIGSTY.el10.x86_64.rpm
logical_ddl_170.1.0el10.aarch64pigsty17.3 KiBlogical_ddl_17-0.1.0-1PIGSTY.el10.aarch64.rpm
postgresql-17-logical-ddl0.1.0d12.x86_64pigsty15.3 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-17-logical-ddl0.1.0d12.aarch64pigsty15.3 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-17-logical-ddl0.1.0d13.x86_64pigsty15.3 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~trixie_amd64.deb
postgresql-17-logical-ddl0.1.0d13.aarch64pigsty15.3 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~trixie_arm64.deb
postgresql-17-logical-ddl0.1.0u22.x86_64pigsty18.6 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~jammy_amd64.deb
postgresql-17-logical-ddl0.1.0u22.aarch64pigsty18.7 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~jammy_arm64.deb
postgresql-17-logical-ddl0.1.0u24.x86_64pigsty16.0 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~noble_amd64.deb
postgresql-17-logical-ddl0.1.0u24.aarch64pigsty15.7 KiBpostgresql-17-logical-ddl_0.1.0-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
logical_ddl_160.1.0el8.x86_64pigsty17.1 KiBlogical_ddl_16-0.1.0-1PIGSTY.el8.x86_64.rpm
logical_ddl_160.1.0el8.aarch64pigsty17.3 KiBlogical_ddl_16-0.1.0-1PIGSTY.el8.aarch64.rpm
logical_ddl_160.1.0el9.x86_64pigsty17.0 KiBlogical_ddl_16-0.1.0-1PIGSTY.el9.x86_64.rpm
logical_ddl_160.1.0el9.aarch64pigsty17.1 KiBlogical_ddl_16-0.1.0-1PIGSTY.el9.aarch64.rpm
logical_ddl_160.1.0el10.x86_64pigsty17.2 KiBlogical_ddl_16-0.1.0-1PIGSTY.el10.x86_64.rpm
logical_ddl_160.1.0el10.aarch64pigsty17.3 KiBlogical_ddl_16-0.1.0-1PIGSTY.el10.aarch64.rpm
postgresql-16-logical-ddl0.1.0d12.x86_64pigsty15.3 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-16-logical-ddl0.1.0d12.aarch64pigsty15.2 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-16-logical-ddl0.1.0d13.x86_64pigsty15.3 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~trixie_amd64.deb
postgresql-16-logical-ddl0.1.0d13.aarch64pigsty15.3 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~trixie_arm64.deb
postgresql-16-logical-ddl0.1.0u22.x86_64pigsty18.5 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~jammy_amd64.deb
postgresql-16-logical-ddl0.1.0u22.aarch64pigsty18.6 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~jammy_arm64.deb
postgresql-16-logical-ddl0.1.0u24.x86_64pigsty16.0 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~noble_amd64.deb
postgresql-16-logical-ddl0.1.0u24.aarch64pigsty15.7 KiBpostgresql-16-logical-ddl_0.1.0-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
logical_ddl_150.1.0el8.x86_64pigsty17.1 KiBlogical_ddl_15-0.1.0-1PIGSTY.el8.x86_64.rpm
logical_ddl_150.1.0el8.aarch64pigsty17.3 KiBlogical_ddl_15-0.1.0-1PIGSTY.el8.aarch64.rpm
logical_ddl_150.1.0el9.x86_64pigsty17.0 KiBlogical_ddl_15-0.1.0-1PIGSTY.el9.x86_64.rpm
logical_ddl_150.1.0el9.aarch64pigsty17.1 KiBlogical_ddl_15-0.1.0-1PIGSTY.el9.aarch64.rpm
logical_ddl_150.1.0el10.x86_64pigsty17.2 KiBlogical_ddl_15-0.1.0-1PIGSTY.el10.x86_64.rpm
logical_ddl_150.1.0el10.aarch64pigsty17.3 KiBlogical_ddl_15-0.1.0-1PIGSTY.el10.aarch64.rpm
postgresql-15-logical-ddl0.1.0d12.x86_64pigsty15.3 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-15-logical-ddl0.1.0d12.aarch64pigsty15.3 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-15-logical-ddl0.1.0d13.x86_64pigsty15.3 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~trixie_amd64.deb
postgresql-15-logical-ddl0.1.0d13.aarch64pigsty15.3 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~trixie_arm64.deb
postgresql-15-logical-ddl0.1.0u22.x86_64pigsty18.5 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~jammy_amd64.deb
postgresql-15-logical-ddl0.1.0u22.aarch64pigsty18.6 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~jammy_arm64.deb
postgresql-15-logical-ddl0.1.0u24.x86_64pigsty16.0 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~noble_amd64.deb
postgresql-15-logical-ddl0.1.0u24.aarch64pigsty15.8 KiBpostgresql-15-logical-ddl_0.1.0-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
logical_ddl_140.1.0el8.x86_64pigsty17.1 KiBlogical_ddl_14-0.1.0-1PIGSTY.el8.x86_64.rpm
logical_ddl_140.1.0el8.aarch64pigsty17.3 KiBlogical_ddl_14-0.1.0-1PIGSTY.el8.aarch64.rpm
logical_ddl_140.1.0el9.x86_64pigsty17.0 KiBlogical_ddl_14-0.1.0-1PIGSTY.el9.x86_64.rpm
logical_ddl_140.1.0el9.aarch64pigsty17.1 KiBlogical_ddl_14-0.1.0-1PIGSTY.el9.aarch64.rpm
logical_ddl_140.1.0el10.x86_64pigsty17.2 KiBlogical_ddl_14-0.1.0-1PIGSTY.el10.x86_64.rpm
logical_ddl_140.1.0el10.aarch64pigsty17.3 KiBlogical_ddl_14-0.1.0-1PIGSTY.el10.aarch64.rpm
postgresql-14-logical-ddl0.1.0d12.x86_64pigsty15.3 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-14-logical-ddl0.1.0d12.aarch64pigsty15.3 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-14-logical-ddl0.1.0d13.x86_64pigsty15.3 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~trixie_amd64.deb
postgresql-14-logical-ddl0.1.0d13.aarch64pigsty15.3 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~trixie_arm64.deb
postgresql-14-logical-ddl0.1.0u22.x86_64pigsty18.5 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~jammy_amd64.deb
postgresql-14-logical-ddl0.1.0u22.aarch64pigsty18.5 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~jammy_arm64.deb
postgresql-14-logical-ddl0.1.0u24.x86_64pigsty15.9 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~noble_amd64.deb
postgresql-14-logical-ddl0.1.0u24.aarch64pigsty15.7 KiBpostgresql-14-logical-ddl_0.1.0-1PIGSTY~noble_arm64.deb

Source

pig build pkg logical_ddl;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install logical_ddl;		# install via package name, for the active PG version

pig install logical_ddl -v 18;   # install for PG 18
pig install logical_ddl -v 17;   # install for PG 17
pig install logical_ddl -v 16;   # install for PG 16
pig install logical_ddl -v 15;   # install for PG 15
pig install logical_ddl -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION logical_ddl;

Usage

logical_ddl captures supported DDL changes on tables and replays them through built-in logical replication. The project is aimed at reducing manual DDL operations and avoiding schema drift between publisher and subscriber.

The README states PostgreSQL 11 and above are supported, and the extension works under superuser privileges.

What It Captures

Supported DDL operations are:

  • ALTER TABLE ... RENAME TO ...
  • ALTER TABLE ... RENAME COLUMN ... TO ...
  • ALTER TABLE ... ADD COLUMN ...
  • ALTER TABLE ... ALTER COLUMN ... TYPE ...
  • ALTER TABLE ... DROP COLUMN ...

The README also notes that built-in types, arrays, composite types, domains, and enums are supported, but definitions of composite types, domains, and enums themselves are not replicated.

Publisher Side

CREATE EXTENSION logical_ddl;
INSERT INTO logical_ddl.settings VALUES (true, 'source1');
INSERT INTO logical_ddl.publish_tablelist (relid) VALUES ('table1'::regclass);
ALTER PUBLICATION log_pub_1 ADD TABLE logical_ddl.shadow_table;

The extension captures DDL with an event trigger, stores it in logical_ddl.shadow_table, and publishes that table through logical replication.

Subscriber Side

CREATE EXTENSION logical_ddl;
INSERT INTO logical_ddl.settings VALUES (false, 'source1');
INSERT INTO logical_ddl.subscribe_tablelist (source, relid) VALUES ('source1', 'table1'::regclass);
ALTER SUBSCRIPTION log_sub_1 REFRESH PUBLICATION;

On the subscriber, the extension listens for incoming DDL records and replays the generated SQL against the target table.

Data Model

  • logical_ddl.settings controls whether the node acts as publisher, subscriber, or both.
  • logical_ddl.publish_tablelist controls which tables and command kinds are captured.
  • logical_ddl.subscribe_tablelist controls which tables receive replayed DDL.
  • logical_ddl.shadow_table stores captured commands.
  • logical_ddl.applied_commands tracks generated SQL and whether execution failed.

Caveats

  • DDL support is limited to the operations listed above.
  • Default expressions, constraints, indexes, and USING expressions are not implemented.
  • The README notes the project is still under development and may change incompatibly.

Scope

The upstream README was enough to cover the extension model, captured DDL types, publisher/subscriber setup, and the known caveats. No extra docs page or homepage was needed for the stub.

Last updated on