forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit6adddac
committed
Fix pg_restore's processing of old-style BLOB COMMENTS data.
Prior to 9.0, pg_dump handled comments on large objects by dumping a bunchof COMMENT commands into a single BLOB COMMENTS archive object. Withsufficiently many such comments, some of the commands would likely getsplit across bufferloads when restoring, causing failures indirect-to-database restores (though no problem would be evident in textoutput). This is the same type of issue we have with table data dumped asINSERT commands, and it can be fixed in the same way, by using a mini SQLlexer to figure out where the command boundaries are. Fortunately, theCOMMENT commands are no more complex to lex than INSERTs, so we can justre-use the existing lexer for INSERTs.Per bug #10611 from Jacek Zalewski. Back-patch to all active branches.1 parent4671c30 commit6adddac
File tree
3 files changed
+16
-4
lines changed- src/bin/pg_dump
3 files changed
+16
-4
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
547 | 547 |
| |
548 | 548 |
| |
549 | 549 |
| |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
550 | 554 |
| |
| 555 | + | |
| 556 | + | |
551 | 557 |
| |
552 | 558 |
| |
553 | 559 |
| |
|
Lines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
333 | 333 |
| |
334 | 334 |
| |
335 | 335 |
| |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
336 | 341 |
| |
337 | 342 |
| |
338 |
| - | |
| 343 | + | |
339 | 344 |
| |
340 | 345 |
| |
341 | 346 |
| |
| |||
419 | 424 |
| |
420 | 425 |
| |
421 | 426 |
| |
422 |
| - | |
| 427 | + | |
| 428 | + | |
423 | 429 |
| |
424 |
| - | |
| 430 | + | |
425 | 431 |
| |
426 | 432 |
| |
427 | 433 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1219 | 1219 |
| |
1220 | 1220 |
| |
1221 | 1221 |
| |
1222 |
| - | |
| 1222 | + | |
1223 | 1223 |
| |
1224 | 1224 |
| |
1225 | 1225 |
| |
|
0 commit comments
Comments
(0)