logical_ddl
Replicate supported DDL changes over PostgreSQL logical replication
Repository
samedyildirim/logical_ddl
https://github.com/samedyildirim/logical_ddl
Source
logical_ddl-0.1.0.tar.gz
logical_ddl-0.1.0.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
logical_ddl | 0.1.0 | ETL | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9530 | logical_ddl | No | Yes | No | Yes | No | No | logical_ddl |
Pigsty carries the upstream RAISE WARNING typo fix for 0.1.0.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.0 | 1817161514 | logical_ddl | - |
| RPM | PIGSTY | 0.1.0 | 1817161514 | logical_ddl_$v | - |
| DEB | PIGSTY | 0.1.0 | 1817161514 | postgresql-$v-logical-ddl | - |
Build
You can build the RPM / DEB packages for logical_ddl using pig build:
Install
You can install logical_ddl directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
Source: README
logical_ddl captures a limited set of ALTER TABLE changes, writes them into a replicated shadow table, and replays equivalent DDL on logical-replication subscribers.
Supported DDL
ALTER TABLE ... RENAME TO ...ALTER TABLE ... RENAME COLUMN ... TO ...ALTER TABLE ... ADD COLUMN ...ALTER TABLE ... ALTER COLUMN ... TYPE ...ALTER TABLE ... DROP COLUMN ...
Built-in types, arrays, composite types, domains, and enums are supported as column types, but the extension does not replicate the definitions of those custom types themselves.
Publisher and subscriber setup
Main tables
logical_ddl.settings: declares publisher/subscriber role and source name.logical_ddl.publish_tablelist: tables and command kinds to capture.logical_ddl.subscribe_tablelist: target tables and command kinds to replay.logical_ddl.shadow_table: replicated command log.logical_ddl.applied_commands: replay history and failure tracking.
Caveats
- The extension works under superuser privileges.
USINGexpressions for type changes, default expressions, constraints, and indexes are not implemented.- Pigsty notes an upstream
RAISE WARNINGtypo fix for0.1.0; that does not change the user-facing usage documented here.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)