forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit286af0c
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 parent5599f40 commit286af0c
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 |
| |
| |||
543 | 555 |
| |
544 | 556 |
| |
545 | 557 |
| |
| 558 | + | |
| 559 | + | |
546 | 560 |
| |
547 | 561 |
| |
548 | 562 |
| |
| |||
1478 | 1492 |
| |
1479 | 1493 |
| |
1480 | 1494 |
| |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1481 | 1509 |
| |
1482 | 1510 |
| |
1483 | 1511 |
| |
| |||
1529 | 1557 |
| |
1530 | 1558 |
| |
1531 | 1559 |
| |
1532 |
| - | |
| 1560 | + | |
1533 | 1561 |
| |
1534 | 1562 |
| |
1535 | 1563 |
| |
| |||
1540 | 1568 |
| |
1541 | 1569 |
| |
1542 | 1570 |
| |
| 1571 | + | |
| 1572 | + | |
1543 | 1573 |
| |
1544 | 1574 |
| |
1545 | 1575 |
| |
|
0 commit comments
Comments
(0)