forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6d7547c
committed
On Windows, wait a little to see if ERROR_ACCESS_DENIED goes away.
Attempting to open a file fails with ERROR_ACCESS_DENIED if the fileis flagged for deletion but not yet actually gone (another in a longlist of reasons why Windows is broken, if you ask me). This seemslikely to explain a lot of irreproducible failures we see in thebuildfarm. This state generally persists for only a millisecond or so,so just wait a bit and retry. If it's a real permissions problem,we'll eventually give up and report it as such. If it's the pendingdeletion case, we'll see file-not-found and report that after thedeletion completes, and the caller will treat that in an appropriateway.In passing, rejigger the existing retry logic for some other errorcases so that we don't uselessly wait an extra time when we'renot going to retry anymore.Alexander Lakhin (with cosmetic tweaks by me). Back-patch to allsupported branches, since this seems like a pretty safe change andthe problem is definitely real.Discussion:https://postgr.es/m/16161-7a985d2f1bbe8f71@postgresql.org1 parent91fca4b commit6d7547c
1 file changed
+22
-5
lines changedLines changed: 22 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
115 |
| - | |
| 114 | + | |
| 115 | + | |
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 | 122 |
| |
126 | 123 |
| |
127 | 124 |
| |
| |||
132 | 129 |
| |
133 | 130 |
| |
134 | 131 |
| |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
135 | 151 |
| |
| 152 | + | |
136 | 153 |
| |
137 | 154 |
| |
138 | 155 |
| |
|
0 commit comments
Comments
(0)