forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit93078e6
committed
Maintain valid md.c state when FileClose() fails.
FileClose() failure ordinarily causes a PANIC. Suppose the userdisables that PANIC via data_sync_retry=on. After mdclose() issued aFileClose() that failed, calls into md.c raised SIGSEGV. This fix addsrepalloc() calls during mdclose(); update a comment about ignoringrepalloc() cost. The rate of relation segment count change is a minorfactor; more relevant to overall performance is the rate of mdclose()and subsequent re-opening of segments. Back-patch to v10, where commit45e191e introduced the bug.Reviewed by Kyotaro Horiguchi.Discussion:https://postgr.es/m/20191222091930.GA1280238@rfd.leadboat.com1 parent2e89a12 commit93078e6
1 file changed
+6
-14
lines changedLines changed: 6 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
491 | 491 |
| |
492 | 492 |
| |
493 | 493 |
| |
494 |
| - | |
495 |
| - | |
496 |
| - | |
497 |
| - | |
498 |
| - | |
499 |
| - | |
500 |
| - | |
| 494 | + | |
| 495 | + | |
501 | 496 |
| |
502 | 497 |
| |
503 |
| - | |
504 |
| - | |
505 |
| - | |
506 | 498 |
| |
507 | 499 |
| |
508 | 500 |
| |
| |||
1025 | 1017 |
| |
1026 | 1018 |
| |
1027 | 1019 |
| |
1028 |
| - | |
1029 |
| - | |
1030 |
| - | |
1031 |
| - | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1032 | 1024 |
| |
1033 | 1025 |
| |
1034 | 1026 |
| |
|
0 commit comments
Comments
(0)