forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitce5542d
committed
When performing a base backup, check for read errors.
The old code didn't differentiate between a read error and aconcurrent truncation. fread reports both of these by returning 0;you have to use feof() or ferror() to distinguish between them,which this code did not do.It might be a better idea to use read() rather than fread() here,so that we can display a less-generic error message, but I'm notsure that would qualify as a back-patchable bug fix, so just dothis much for now.Jeevan Chalke, reviewed by Jeevan Ladhe and by me.Discussion:http://postgr.es/m/CA+TgmobG4ywMzL5oQq2a8YKp8x2p3p1LOMMcGqpS7aekT9+ETA@mail.gmail.com1 parentd57a931 commitce5542d
1 file changed
+31
-1
lines changedLines changed: 31 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
93 | 105 |
| |
94 | 106 |
| |
95 | 107 |
| |
| |||
550 | 562 |
| |
551 | 563 |
| |
552 | 564 |
| |
| 565 | + | |
| 566 | + | |
553 | 567 |
| |
554 | 568 |
| |
555 | 569 |
| |
| |||
1490 | 1504 |
| |
1491 | 1505 |
| |
1492 | 1506 |
| |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1493 | 1521 |
| |
1494 | 1522 |
| |
1495 | 1523 |
| |
| |||
1541 | 1569 |
| |
1542 | 1570 |
| |
1543 | 1571 |
| |
1544 |
| - | |
| 1572 | + | |
1545 | 1573 |
| |
1546 | 1574 |
| |
1547 | 1575 |
| |
| |||
1552 | 1580 |
| |
1553 | 1581 |
| |
1554 | 1582 |
| |
| 1583 | + | |
| 1584 | + | |
1555 | 1585 |
| |
1556 | 1586 |
| |
1557 | 1587 |
| |
|
0 commit comments
Comments
(0)