- Notifications
You must be signed in to change notification settings - Fork28
Commitbec96c8
committed
Dump sequence data based on the TableDataInfo flag
When considering a sequence's Data entry in dumpSequenceData, we wereactually looking at the sequence definition's dump flag to decide if weshould dump the data or not. That's generally fine, except for when thesequence data entry was created by processExtensionTables() because it'sa config sequence. In that case, the sequence itself won't be marked asdumping data because it's part of an extension, leading to the need forprocessExtensionTables() to create the sequence data entry.This leads to extension config sequence data not being included in thedump when it should be. Fix this by looking at the sequence data's dumpflag instead, just as dumpTableData() was doing for tables (which is whyconfig tables were correctly being handled), and add a regression testto make sure we don't break it moving forward.All of this is a bit round-about since we can now represent whichcomponents of a given dump item should be dumped out through the dumpflag. A future improvement might be to change checkExtensionMembership()to check for config sequences/tables and set the dump flag based on thatdirectly, possibly removing the need for processExtensionTables().Bug found by Daniele Varrazzo.Discussion:https://postgr.es/m/CA+mi_8ZmxQM7+nZ7pJ8uyfxc9V3o=UAG14dVqvftdmvw8OJ3gQ@mail.gmail.comPatch by Michael Paquier, with some tweaking of the regression tests byme.Back-patch to 9.6 where the bug was introduced.1 parent30bcebb commitbec96c8
File tree
3 files changed
+23
-1
lines changed- src
- bin/pg_dump
- test/modules/test_pg_dump
- t
3 files changed
+23
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15671 | 15671 |
| |
15672 | 15672 |
| |
15673 | 15673 |
| |
15674 |
| - | |
| 15674 | + | |
15675 | 15675 |
| |
15676 | 15676 |
| |
15677 | 15677 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
268 | 287 |
| |
269 | 288 |
| |
270 | 289 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 |
| |
14 | 17 |
| |
15 | 18 |
| |
|
0 commit comments
Comments
(0)