- Notifications
You must be signed in to change notification settings - Fork5
Commitab9a14e
committed
Fix WAL file replacement during cascading replication on Windows.
When the startup process restores a WAL file from the archive, it deletesany old file with the same name and renames the new file in its place. OnWindows, however, when a file is deleted, it still lingers as long as aprocess holds a file handle open on it. With cascading replication, awalsender process can hold the old file open, so the rename() in the startupprocess would fail. To fix that, rename the old file to a temporary name, tomake the original file name available for reuse, before deleting the oldfile.1 parent2e0cc1f commitab9a14e
1 file changed
+27
-1
lines changedLines changed: 27 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2787 | 2787 |
| |
2788 | 2788 |
| |
2789 | 2789 |
| |
2790 |
| - | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
2791 | 2817 |
| |
2792 | 2818 |
| |
2793 | 2819 |
| |
|
0 commit comments
Comments
(0)