- Notifications
You must be signed in to change notification settings - Fork5
Commit8a504a3
committed
Make pg_dump emit more accurate dependency information.
While pg_dump has included dependency information in archive-format outputever since 7.3, it never made any large effort to ensure that thatinformation was actually useful. In particular, in common situations wheredependency chains include objects that aren't separately emitted in thedump, the dependencies shown for objects that were emitted would referencethe dump IDs of these un-dumped objects, leaving no clue about which otherobjects the visible objects indirectly depend on. So far, parallelpg_restore has managed to avoid tripping over this misfeature, but onlyby dint of some crude hacks like not trusting dependency information inthe pre-data section of the archive.It seems prudent to do something about this before it rises up to bite us,so instead of emitting the "raw" dependencies of each dumped object,recursively search for its actual dependencies among the subset of objectsthat are being dumped.Back-patch to 9.2, since that code hasn't yet diverged materially fromHEAD. At some point we might need to back-patch further, but right nowthere are no known cases where this is actively necessary. (The one knowncase, bug #6699, is fixed in a different way by my previous patch.) Sincethis patch depends on 9.2 changes that made TOC entries be marked beforeoutput commences as to whether they'll be dumped, back-patching furtherwould require additional surgery; and as of now there's no evidence thatit's worth the risk.1 parenta1ef01f commit8a504a3
2 files changed
+182
-42
lines changedLines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3498 | 3498 |
| |
3499 | 3499 |
| |
3500 | 3500 |
| |
3501 |
| - | |
3502 |
| - | |
3503 |
| - | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
3504 | 3509 |
| |
3505 | 3510 |
| |
3506 | 3511 |
| |
| |||
4162 | 4167 |
| |
4163 | 4168 |
| |
4164 | 4169 |
| |
4165 |
| - | |
4166 |
| - | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
4167 | 4173 |
| |
4168 | 4174 |
| |
4169 | 4175 |
| |
|
0 commit comments
Comments
(0)