forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit62fb12d
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 parent4950f09 commit62fb12d
1 file changed
+16
-0
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
88 | 100 |
| |
89 | 101 |
| |
90 | 102 |
| |
| |||
509 | 521 |
| |
510 | 522 |
| |
511 | 523 |
| |
| 524 | + | |
| 525 | + | |
512 | 526 |
| |
513 | 527 |
| |
514 | 528 |
| |
| |||
1245 | 1259 |
| |
1246 | 1260 |
| |
1247 | 1261 |
| |
| 1262 | + | |
| 1263 | + | |
1248 | 1264 |
| |
1249 | 1265 |
| |
1250 | 1266 |
| |
|
0 commit comments
Comments
(0)