forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc89a0dd
committed
Repair longstanding bug in slru/clog logic: it is possible for two backends
to try to create a log segment file concurrently, but the code erroneouslyspecified O_EXCL to open(), resulting in a needless failure. Before 7.4,it was even a PANIC condition :-(. Correct code is actually simpler thanwhat we had, because we can just say O_CREAT to start with and not need asecond open() call. I believe this accounts for several recent reports ofhard-to-reproduce "could not create file ...: File exists" errors in bothpg_clog and pg_subtrans.1 parent4789e98 commitc89a0dd
1 file changed
+10
-25
lines changedLines changed: 10 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
132 | 131 |
| |
133 | 132 |
| |
134 | 133 |
| |
| |||
652 | 651 |
| |
653 | 652 |
| |
654 | 653 |
| |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
655 | 658 |
| |
656 | 659 |
| |
657 |
| - | |
| 660 | + | |
| 661 | + | |
658 | 662 |
| |
659 | 663 |
| |
660 |
| - | |
661 |
| - | |
662 |
| - | |
663 |
| - | |
664 |
| - | |
665 |
| - | |
666 |
| - | |
667 |
| - | |
668 |
| - | |
669 |
| - | |
670 |
| - | |
671 |
| - | |
672 |
| - | |
673 |
| - | |
674 |
| - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
675 | 667 |
| |
676 | 668 |
| |
677 | 669 |
| |
| |||
763 | 755 |
| |
764 | 756 |
| |
765 | 757 |
| |
766 |
| - | |
767 |
| - | |
768 |
| - | |
769 |
| - | |
770 |
| - | |
771 |
| - | |
772 |
| - | |
773 | 758 |
| |
774 | 759 |
| |
775 | 760 |
| |
|
0 commit comments
Comments
(0)