- Notifications
You must be signed in to change notification settings - Fork28
Commite41d0a1
committed
Add proper errcodes to new error messages for read() failures
Those would use the default ERRCODE_INTERNAL_ERROR, but for foreseeablefailures an errcode ought to be set, ERRCODE_DATA_CORRUPTED making themost sense here.While on the way, fix one errcode_for_file_access missing in origin.csince the code has been created, and remove one assignment of errno to 0before calling read(), as this was around to fit with what was presentbefore811b6e3 where errno would not be set when not enough bytes areread. I have noticed the first one, and Tom has pinged me about thesecond one.Author: Michael PaquierReported-by: Tom LaneDiscussion:https://postgr.es/m/27265.1531925836@sss.pgh.pa.us1 parent56df07b commite41d0a1
File tree
7 files changed
+30
-16
lines changed- src
- backend
- access/transam
- replication
- logical
- utils/cache
- common
7 files changed
+30
-16
lines changedLines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3412 | 3412 |
| |
3413 | 3413 |
| |
3414 | 3414 |
| |
3415 |
| - | |
3416 | 3415 |
| |
3417 | 3416 |
| |
3418 | 3417 |
| |
| |||
3424 | 3423 |
| |
3425 | 3424 |
| |
3426 | 3425 |
| |
3427 |
| - | |
| 3426 | + | |
| 3427 | + | |
3428 | 3428 |
| |
3429 | 3429 |
| |
3430 | 3430 |
| |
| |||
4564 | 4564 |
| |
4565 | 4565 |
| |
4566 | 4566 |
| |
4567 |
| - | |
| 4567 | + | |
| 4568 | + | |
4568 | 4569 |
| |
4569 | 4570 |
| |
4570 | 4571 |
| |
| |||
11829 | 11830 |
| |
11830 | 11831 |
| |
11831 | 11832 |
| |
11832 |
| - | |
| 11833 | + | |
| 11834 | + | |
11833 | 11835 |
| |
11834 | 11836 |
| |
11835 | 11837 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
718 |
| - | |
| 718 | + | |
| 719 | + | |
719 | 720 |
| |
720 | 721 |
| |
721 | 722 |
| |
722 |
| - | |
| 723 | + | |
| 724 | + | |
723 | 725 |
| |
724 | 726 |
| |
725 | 727 |
| |
|
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1736 | 1736 |
| |
1737 | 1737 |
| |
1738 | 1738 |
| |
1739 |
| - | |
| 1739 | + | |
| 1740 | + | |
1740 | 1741 |
| |
1741 | 1742 |
| |
1742 | 1743 |
| |
| |||
1775 | 1776 |
| |
1776 | 1777 |
| |
1777 | 1778 |
| |
1778 |
| - | |
| 1779 | + | |
| 1780 | + | |
1779 | 1781 |
| |
1780 | 1782 |
| |
1781 | 1783 |
| |
| |||
1802 | 1804 |
| |
1803 | 1805 |
| |
1804 | 1806 |
| |
1805 |
| - | |
| 1807 | + | |
| 1808 | + | |
1806 | 1809 |
| |
1807 | 1810 |
| |
1808 | 1811 |
| |
| |||
1828 | 1831 |
| |
1829 | 1832 |
| |
1830 | 1833 |
| |
1831 |
| - | |
| 1834 | + | |
| 1835 | + | |
1832 | 1836 |
| |
1833 | 1837 |
| |
1834 | 1838 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1420 | 1420 |
| |
1421 | 1421 |
| |
1422 | 1422 |
| |
1423 |
| - | |
| 1423 | + | |
| 1424 | + | |
1424 | 1425 |
| |
1425 | 1426 |
| |
1426 | 1427 |
| |
| |||
1464 | 1465 |
| |
1465 | 1466 |
| |
1466 | 1467 |
| |
1467 |
| - | |
| 1468 | + | |
| 1469 | + | |
1468 | 1470 |
| |
1469 | 1471 |
| |
1470 | 1472 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
509 | 509 |
| |
510 | 510 |
| |
511 | 511 |
| |
512 |
| - | |
| 512 | + | |
| 513 | + | |
513 | 514 |
| |
514 | 515 |
| |
515 | 516 |
| |
| |||
2442 | 2443 |
| |
2443 | 2444 |
| |
2444 | 2445 |
| |
2445 |
| - | |
| 2446 | + | |
| 2447 | + | |
2446 | 2448 |
| |
2447 | 2449 |
| |
2448 | 2450 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
669 | 669 |
| |
670 | 670 |
| |
671 | 671 |
| |
672 |
| - | |
| 672 | + | |
| 673 | + | |
673 | 674 |
| |
674 | 675 |
| |
675 | 676 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
| 86 | + | |
| 87 | + | |
87 | 88 |
| |
88 | 89 |
| |
89 | 90 |
| |
|
0 commit comments
Comments
(0)