forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4eb2176
committed
Fix DROP {DATABASE,TABLESPACE} on Windows.
Previously, it was possible for DROP DATABASE, DROP TABLESPACE and ALTERDATABASE SET TABLESPACE to fail because other backends still had filehandles open for dropped tables. Windows won't allow a directorycontaining unlinked-but-still-open files to be unlinked. Tackle thisproblem by forcing all backends to close all smgr fds. No change forUnix systems, which don't suffer from the problem, but the new code pathcan be tested by Unix-based developers by definingUSE_BARRIER_SMGRRELEASE explicitly.It's possible that PROCSIGNAL_BARRIER_SMGRRELEASE will have morebug-fixing applications soon (under discussion). Note that this is thefirst user of the ProcSignalBarrier mechanism from commit16a4e4a. Itcould in principle be back-patched as far as 14, but since fieldcomplaints are rare and ProcSignalBarrier hasn't been battle-tested,that seems like a bad idea. Fix in master only, where these failureshave started to show up in automated testing due to new tests.Suggested-by: Andres Freund <andres@anarazel.de>Reviewed-by: Andres Freund <andres@anarazel.de>Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Reviewed-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/CA+hUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJk6-U56oStjtg@mail.gmail.com1 parente5691cc commit4eb2176
File tree
9 files changed
+77
-36
lines changed- src
- backend
- commands
- storage
- ipc
- smgr
- include
- storage
9 files changed
+77
-36
lines changedLines changed: 16 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
997 | 997 |
| |
998 | 998 |
| |
999 | 999 |
| |
1000 |
| - | |
1001 |
| - | |
1002 |
| - | |
| 1000 | + | |
1003 | 1001 |
| |
1004 | 1002 |
| |
1005 | 1003 |
| |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1006 | 1009 |
| |
1007 | 1010 |
| |
1008 | 1011 |
| |
| |||
1251 | 1254 |
| |
1252 | 1255 |
| |
1253 | 1256 |
| |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
1254 | 1262 |
| |
1255 | 1263 |
| |
1256 | 1264 |
| |
| |||
2258 | 2266 |
| |
2259 | 2267 |
| |
2260 | 2268 |
| |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
2261 | 2274 |
| |
2262 | 2275 |
| |
2263 | 2276 |
| |
|
Lines changed: 20 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
539 |
| - | |
540 |
| - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
541 | 544 |
| |
542 | 545 |
| |
543 |
| - | |
544 |
| - | |
545 |
| - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
546 | 550 |
| |
547 |
| - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
548 | 557 |
| |
549 | 558 |
| |
550 | 559 |
| |
| |||
1582 | 1591 |
| |
1583 | 1592 |
| |
1584 | 1593 |
| |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1585 | 1599 |
| |
1586 | 1600 |
| |
1587 | 1601 |
| |
|
Lines changed: 3 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
| |||
94 | 95 |
| |
95 | 96 |
| |
96 | 97 |
| |
97 |
| - | |
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| |||
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
539 |
| - | |
540 |
| - | |
| 539 | + | |
| 540 | + | |
541 | 541 |
| |
542 | 542 |
| |
543 | 543 |
| |
| |||
603 | 603 |
| |
604 | 604 |
| |
605 | 605 |
| |
606 |
| - | |
607 |
| - | |
608 |
| - | |
609 |
| - | |
610 |
| - | |
611 |
| - | |
612 |
| - | |
613 |
| - | |
614 |
| - | |
615 |
| - | |
616 |
| - | |
617 |
| - | |
618 |
| - | |
619 |
| - | |
620 |
| - | |
621 |
| - | |
622 |
| - | |
623 |
| - | |
624 | 606 |
| |
625 | 607 |
| |
626 | 608 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
549 | 549 |
| |
550 | 550 |
| |
551 | 551 |
| |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
552 | 558 |
| |
553 | 559 |
| |
554 | 560 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
| |||
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| 73 | + | |
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
| |||
693 | 695 |
| |
694 | 696 |
| |
695 | 697 |
| |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + |
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
155 | 166 |
| |
156 | 167 |
| |
157 | 168 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
|
Lines changed: 1 addition & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
| 52 | + | |
58 | 53 |
| |
59 | 54 |
| |
60 | 55 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
| 107 | + | |
107 | 108 |
| |
108 | 109 |
|
0 commit comments
Comments
(0)