forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb74e94d
committed
Rethink PROCSIGNAL_BARRIER_SMGRRELEASE.
With sufficiently bad luck, it was possible for IssuePendingWritebacks()to reopen a file after we'd processed PROCSIGNAL_BARRIER_SMGRRELEASE andbefore the file was unlinked by some other backend. That left a smallhole in commit4eb2176's plan to fix all spurious errors from DROPTABLESPACE and similar on Windows.Fix by closing md.c's segments, instead of just closing fd.c'sdescriptors, and then teaching smgrwriteback() not to open files thataren't already open.Reported-by: Andres Freund <andres@anarazel.de>Reviewed-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/20220209220004.kb3dgtn2x2k2gtdm%40alap3.anarazel.de1 parent701d918 commitb74e94d
4 files changed
+52
-18
lines changedLines changed: 13 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
| 119 | + | |
| 120 | + | |
119 | 121 |
| |
120 | 122 |
| |
121 | 123 |
| |
| |||
551 | 553 |
| |
552 | 554 |
| |
553 | 555 |
| |
554 |
| - | |
555 |
| - | |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 | 556 |
| |
561 | 557 |
| |
562 | 558 |
| |
| |||
605 | 601 |
| |
606 | 602 |
| |
607 | 603 |
| |
608 |
| - | |
| 604 | + | |
609 | 605 |
| |
610 | 606 |
| |
611 | 607 |
| |
612 |
| - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
613 | 612 |
| |
614 | 613 |
| |
615 | 614 |
| |
| |||
1202 | 1201 |
| |
1203 | 1202 |
| |
1204 | 1203 |
| |
1205 |
| - | |
| 1204 | + | |
| 1205 | + | |
1206 | 1206 |
| |
1207 | 1207 |
| |
1208 | 1208 |
| |
| |||
1213 | 1213 |
| |
1214 | 1214 |
| |
1215 | 1215 |
| |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1216 | 1220 |
| |
1217 | 1221 |
| |
1218 | 1222 |
| |
|
Lines changed: 37 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
45 | 44 |
| |
46 | 45 |
| |
47 | 46 |
| |
| |||
70 | 69 |
| |
71 | 70 |
| |
72 | 71 |
| |
73 |
| - | |
74 | 72 |
| |
75 | 73 |
| |
76 | 74 |
| |
| |||
281 | 279 |
| |
282 | 280 |
| |
283 | 281 |
| |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
284 | 318 |
| |
285 | 319 |
| |
286 | 320 |
| |
| |||
698 | 732 |
| |
699 | 733 |
| |
700 | 734 |
| |
701 |
| - | |
702 |
| - | |
703 |
| - | |
704 |
| - | |
705 |
| - | |
706 |
| - | |
| 735 | + | |
707 | 736 |
| |
708 | 737 |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 | 26 |
| |
28 | 27 |
| |
29 | 28 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
| 89 | + | |
88 | 90 |
| |
89 | 91 |
| |
90 | 92 |
| |
|
0 commit comments
Comments
(0)