forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit61c65cc
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 parentaf28744 commit61c65cc
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 |
| |
| |||
1487 | 1501 |
| |
1488 | 1502 |
| |
1489 | 1503 |
| |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1490 | 1518 |
| |
1491 | 1519 |
| |
1492 | 1520 |
| |
| |||
1538 | 1566 |
| |
1539 | 1567 |
| |
1540 | 1568 |
| |
1541 |
| - | |
| 1569 | + | |
1542 | 1570 |
| |
1543 | 1571 |
| |
1544 | 1572 |
| |
| |||
1549 | 1577 |
| |
1550 | 1578 |
| |
1551 | 1579 |
| |
| 1580 | + | |
| 1581 | + | |
1552 | 1582 |
| |
1553 | 1583 |
| |
1554 | 1584 |
| |
|
0 commit comments
Comments
(0)