| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Joel Jacobson" <joel(at)compiler(dot)org> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Missing pg_depend entries for constraints created by extensions (deptype 'e') |
| Date: | 2025-06-01 16:04:13 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Joel Jacobson" <joel(at)compiler(dot)org> writes:
> Explicitly adding deptype='e' entries for all objects created during
> CREATE EXTENSION would significantly improve this situation.
> With this enhancement, pg_dump could easily detect and warn users about
> manually-added objects, or even dump these objects as comments for manual review.
I'm pretty skeptical that this situation justifies the amount of
pg_depend bloat that you're suggesting. I also don't think it'd be
easy or cheap for pg_dump to detect objects that should be dumped
because they lack an 'e' dependency but depend on objects that do
have one. Normally, because extension member objects aren't dumped,
pg_dump doesn't even collect info on their indexes etc.
In short, it seems like quite a lot of work and quite a lot of
overhead (paid by everybody) to accommodate somebody abusing
extensions in one very specific way. There are a lot of scenarios
in which a cowboy DBA can cause the database contents to differ
from what the extension scripts say, and most of them would not
be helped by what you're suggesting.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2025-06-01 16:06:51 | RelationGetNumberOfBlocks called before vacuum_get_cutoffs |
| Previous Message | jian he | 2025-06-01 15:44:46 | CREATE DOMAIN create two not null constraints |