forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit79ce29c
committed
Retry short writes when flushing WAL.
We don't normally bother retrying when the number of bytes written bywrite() is short of what was requested. It is generally assumed that awrite() to disk doesn't return short, unless you run out of disk space.While writing the WAL, however, it seems prudent to try a bit harder,because a failure leads to PANIC. The write() is also much larger than mostwrite()s in the backend (up to wal_buffers), so there's more room forsurprises.Also retry on EINTR. All signals used in the backend are flagged SA_RESTARTnowadays, so it shouldn't happen, but better to be defensive.1 parent129759d commit79ce29c
1 file changed
+20
-12
lines changedLines changed: 20 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1606 | 1606 |
| |
1607 | 1607 |
| |
1608 | 1608 |
| |
| 1609 | + | |
| 1610 | + | |
1609 | 1611 |
| |
1610 | 1612 |
| |
1611 | 1613 |
| |
| |||
1622 | 1624 |
| |
1623 | 1625 |
| |
1624 | 1626 |
| |
1625 |
| - | |
1626 |
| - | |
| 1627 | + | |
| 1628 | + | |
1627 | 1629 |
| |
1628 |
| - | |
1629 |
| - | |
1630 |
| - | |
1631 |
| - | |
1632 |
| - | |
1633 |
| - | |
1634 |
| - | |
1635 |
| - | |
1636 |
| - | |
1637 |
| - | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
1638 | 1646 |
| |
1639 | 1647 |
| |
1640 | 1648 |
| |
|
0 commit comments
Comments
(0)