forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfbe8971
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 parent89535db commitfbe8971
1 file changed
+16
-0
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
86 | 98 |
| |
87 | 99 |
| |
88 | 100 |
| |
| |||
494 | 506 |
| |
495 | 507 |
| |
496 | 508 |
| |
| 509 | + | |
| 510 | + | |
497 | 511 |
| |
498 | 512 |
| |
499 | 513 |
| |
| |||
1206 | 1220 |
| |
1207 | 1221 |
| |
1208 | 1222 |
| |
| 1223 | + | |
| 1224 | + | |
1209 | 1225 |
| |
1210 | 1226 |
| |
1211 | 1227 |
| |
|
0 commit comments
Comments
(0)