- Notifications
You must be signed in to change notification settings - Fork5
Commitd3586fc
committed
Ensure unlogged tables are reset even if crash recovery errors out.
Unlogged relations are reset at the end of crash recovery as they'reonly synced to disk during a proper shutdown. Unfortunately that andlater steps can fail, e.g. due to running out of space. This resetwas, up to now performed after marking the database as having finishedcrash recovery successfully. As out of space errors trigger a crashrestart that could lead to the situation that not all unloggedrelations are reset.Once that happend usage of unlogged relations could yield errors like"could not open file "...": No such file or directory". Luckilyclusters that show the problem can be fixed by performing a immediateshutdown, and starting the database again.To fix, just call ResetUnloggedRelations(UNLOGGED_RELATION_INIT)earlier, before marking the database as having successfully recovered.Discussion: 20140912112246.GA4984@alap3.anarazel.deBackpatch to 9.1 where unlogged tables were introduced.Abhijit Menon-Sen and Andres Freund1 parent0ce627d commitd3586fc
1 file changed
+10
-8
lines changedLines changed: 10 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6446 | 6446 |
| |
6447 | 6447 |
| |
6448 | 6448 |
| |
| 6449 | + | |
| 6450 | + | |
| 6451 | + | |
| 6452 | + | |
| 6453 | + | |
| 6454 | + | |
| 6455 | + | |
| 6456 | + | |
| 6457 | + | |
| 6458 | + | |
6449 | 6459 |
| |
6450 | 6460 |
| |
6451 | 6461 |
| |
| |||
6713 | 6723 |
| |
6714 | 6724 |
| |
6715 | 6725 |
| |
6716 |
| - | |
6717 |
| - | |
6718 |
| - | |
6719 |
| - | |
6720 |
| - | |
6721 |
| - | |
6722 |
| - | |
6723 |
| - | |
6724 | 6726 |
| |
6725 | 6727 |
| |
6726 | 6728 |
| |
|
0 commit comments
Comments
(0)