PGC excludes tables owned by extensions from the dump (via pg_depend deptype = 'e' filter). As a side effect, any objects manually created on those tables are also silently skipped, even though they are not part of the extension itself.
This affects all object types that can be created on a table:
- Indexes (
CREATE INDEX)
- Triggers (
CREATE TRIGGER)
- Constraints (
ALTER TABLE ... ADD CONSTRAINT — CHECK, UNIQUE, FOREIGN KEY)
- Policies (
CREATE POLICY)
- Rules (
CREATE RULE)
- Statistics (
CREATE STATISTICS)
Example
Extension pg_dbms_job owns table dbms_job.all_scheduler_job_run_details
For example, the following index was created manually on this table:
CREATE INDEX idx_log_date ON dbms_job.all_scheduler_job_run_details (log_date);
And this index will not be included in the dump
Root Cause
In src/dump/core.rs, the table query filters out extension-owned tables:
and not exists (
select 1 from pg_depend ext_dep
where ext_dep.objid = c.oid
and ext_dep.deptype = 'e'
)
Since the table is excluded, none of its dependent objects are ever fetched, regardless of whether those objects themselves belong to the extension
PGC excludes tables owned by extensions from the dump (via
pg_depend deptype = 'e'filter). As a side effect, any objects manually created on those tables are also silently skipped, even though they are not part of the extension itself.This affects all object types that can be created on a table:
CREATE INDEX)CREATE TRIGGER)ALTER TABLE ... ADD CONSTRAINT — CHECK, UNIQUE, FOREIGN KEY)CREATE POLICY)CREATE RULE)CREATE STATISTICS)Example
Extension
pg_dbms_jobowns tabledbms_job.all_scheduler_job_run_detailsFor example, the following index was created manually on this table:
And this index will not be included in the dump
Root Cause
In
src/dump/core.rs, the table query filters out extension-owned tables:Since the table is excluded, none of its dependent objects are ever fetched, regardless of whether those objects themselves belong to the extension