ddl_historization
ddl_historization
ddl_historization : Historize the ddl changes inside PostgreSQL database
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4310 | ddl_historization
|
ddl_historization
|
0.0.7 |
UTIL
|
GPL-2.0
|
SQL
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
----d--
|
No
|
No
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| Requires | plpgsql
|
| Need By | schedoc
|
| See Also | pg_readme
data_historization
table_version
gzip
bzip
zstd
http
pg_net
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.0.7 |
18
17
16
15
14
|
ddl_historization |
plpgsql |
| RPM | PIGSTY
|
0.0.7 |
18
17
16
15
14
|
ddl_historization_$v |
- |
| DEB | PIGSTY
|
0.0.7 |
18
17
16
15
14
|
postgresql-$v-ddl-historization |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
el8.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
el9.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
el9.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
el10.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
el10.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
d12.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
d12.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
d13.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
d13.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
u22.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
u22.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
u24.x86_64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
u24.aarch64
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
PIGSTY 0.0.7
|
Source
pig build pkg ddl_historization; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install ddl_historization; # install via package name, for the active PG version
pig install ddl_historization -v 18; # install for PG 18
pig install ddl_historization -v 17; # install for PG 17
pig install ddl_historization -v 16; # install for PG 16
pig install ddl_historization -v 15; # install for PG 15
pig install ddl_historization -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION ddl_historization CASCADE; -- requires plpgsqlUsage
ddl_historization: Track all DDL changes in a PostgreSQL database
Records all DDL changes (CREATE, ALTER, DROP, etc.) made on a database into a historization table for auditing and tracking purposes.
Setup
CREATE EXTENSION ddl_historization;The extension installs event triggers that automatically capture DDL statements and store them in the historization table.
Querying DDL History
After installation, all DDL changes are logged automatically. Query the history table to see what changes have been made:
SELECT * FROM ddl_history ORDER BY ddl_date DESC;Integration with pg_tle
For AWS RDS environments, the extension can be deployed via pg_tle:
-- Build the pg_tle deployment file
-- $ make pgtle
-- Then execute pgtle.ddl_historization-0.3.sql on your instanceNotes
- DDL statements are captured via PostgreSQL event triggers
- Works with
CREATE,ALTER,DROP, and other DDL commands - Used as a dependency by the
schedocextension for schema documentation
Last updated on