- Notifications
You must be signed in to change notification settings - Fork28
Commit060393f
committed
Fix pg_dump's errno checking for zlib I/O
Some error reports were reporting strerror(errno), which for some errorconditions coming from zlib are wrong, resulting in confusing reportssuch as pg_restore: [compress_io] could not read from input file: Successwhich makes no sense. To correctly extract the error message we need touse gzerror(), so let's do that.This isn't as comprehensive or as neat as I would like, but at least itshould improve things in many common cases. The zlib abstraction incompress_io does not seem to be applied consistently enough; we couldperhaps improve that, but it seems master-only material, not a bug fixfor back-patching.This problem goes back all the way, but I decided to apply back to 9.4only, because older branches don't contain commit14ea893 which thischange depends on.Authors: Vladimir Kunschikov, Álvaro HerreraDiscussion:https://postgr.es/m/1498120508308.9826@infotecs.ru1 parente5c87d5 commit060393f
File tree
4 files changed
+38
-5
lines changed- src/bin/pg_dump
4 files changed
+38
-5
lines changedLines changed: 23 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
592 | 592 |
| |
593 | 593 |
| |
594 | 594 |
| |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
595 | 599 |
| |
596 |
| - | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
597 | 603 |
| |
598 | 604 |
| |
599 | 605 |
| |
| |||
695 | 701 |
| |
696 | 702 |
| |
697 | 703 |
| |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
698 | 720 |
| |
699 | 721 |
| |
700 | 722 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
| 68 | + | |
68 | 69 |
| |
69 | 70 |
|
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
357 | 357 |
| |
358 | 358 |
| |
359 | 359 |
| |
360 |
| - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
361 | 363 |
| |
362 | 364 |
| |
363 | 365 |
| |
| |||
495 | 497 |
| |
496 | 498 |
| |
497 | 499 |
| |
498 |
| - | |
| 500 | + | |
| 501 | + | |
499 | 502 |
| |
500 | 503 |
| |
501 | 504 |
| |
| |||
524 | 527 |
| |
525 | 528 |
| |
526 | 529 |
| |
527 |
| - | |
| 530 | + | |
| 531 | + | |
528 | 532 |
| |
529 | 533 |
| |
530 | 534 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
557 | 557 |
| |
558 | 558 |
| |
559 | 559 |
| |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
560 | 564 |
| |
561 |
| - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
562 | 568 |
| |
563 | 569 |
| |
564 | 570 |
| |
|
0 commit comments
Comments
(0)