forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5209c0b
committed
Refactor pg_dump's tracking of object components to be dumped.
Split the DumpableObject.dump bitmask field into separate bitmaskstracking which components are requested to be dumped (in theexisting "dump" field) and which components exist for the particularobject (in the new "components" field). This gets rid of someklugy and easily-broken logic that involved setting bits and laterclearing them. More importantly, it restores the originally intendedbehavior that pg_dump's secondary data-gathering queries should notbe executed for objects we have no interest in dumping. Thatoptimization got broken when the dump flag was turned into a bitmask,because irrelevant bits tended to remain set in many cases. Sincethe "components" field starts from a minimal set of bits and isadded onto as needed, ANDing it with "dump" provides a reliableindicator of what we actually have to dump, without having tocomplicate the logic that manages the request bits. This makesa significant difference in the number of queries needed when,for example, there are many functions in extensions.Discussion:https://postgr.es/m/2273648.1634764485@sss.pgh.pa.usDiscussion:https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc1 parente9e63b7 commit5209c0b
3 files changed
+351
-280
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
584 | 584 |
| |
585 | 585 |
| |
586 | 586 |
| |
| 587 | + | |
| 588 | + | |
587 | 589 |
| |
588 | 590 |
| |
589 | 591 |
| |
|
0 commit comments
Comments
(0)