Simplify and speed up pg_dump's creation of parent-table links.
Tom Lane <tgl@sss.pgh.pa.us>
Simplify and speed up pg_dump's creation of parent-table links. Instead of trying to optimize this by skipping creation of the links for tables we don't plan to dump, just create them all in bulk with a single scan over the pg_inherits data. The previous approach was more or less O(N^2) in the number of pg_inherits entries, not to mention being way too complicated. Also, don't create useless TableAttachInfo objects. It's silly to create a TableAttachInfo object that we're not going to dump, when we know perfectly well at creation time that it won't be dumped. Patch by me; thanks to Julien Rouhaud for review. Discussion: https://postgr.es/m/1376149.1675268279@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/common.c | modified | +53 −75 |
| src/bin/pg_dump/pg_dump.c | modified | +0 −3 |
| src/bin/pg_dump/pg_dump.h | modified | +3 −2 |
Discussion
- pg_dump versus hash partitioning 49 messages · 2023-02-01 → 2023-03-18