forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit882c592
committed
Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA.
When we're creating subdirectories of PGDATA during initdb, we know darnwell that the parent directory exists (or should exist) and that the newsubdirectory doesn't (or shouldn't). There is therefore no need to useanything more complicated than mkdir(). Using pg_mkdir_p() just opens usup to unexpected failure modes, such as the one exhibited in bug #13853from Nuri Boardman. It's not very clear why pg_mkdir_p() went wrong there,but it is clear that we didn't need to be trying to create parentdirectories in the first place. We're not even saving any code, as provenby the fact that this patch nets out at minus five lines.Since this is a response to a field bug report, back-patch to all branches.1 parentc7aca3d commit882c592
1 file changed
+22
-27
lines changedLines changed: 22 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
| 203 | + | |
203 | 204 |
| |
204 | 205 |
| |
205 | 206 |
| |
| |||
237 | 238 |
| |
238 | 239 |
| |
239 | 240 |
| |
240 |
| - | |
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
| |||
932 | 932 |
| |
933 | 933 |
| |
934 | 934 |
| |
935 |
| - | |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
947 |
| - | |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 |
| - | |
955 |
| - | |
956 |
| - | |
957 |
| - | |
958 | 935 |
| |
959 | 936 |
| |
960 | 937 |
| |
| |||
3296 | 3273 |
| |
3297 | 3274 |
| |
3298 | 3275 |
| |
3299 |
| - | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
3300 | 3280 |
| |
| 3281 | + | |
3301 | 3282 |
| |
3302 | 3283 |
| |
3303 | 3284 |
| |
| |||
3479 | 3460 |
| |
3480 | 3461 |
| |
3481 | 3462 |
| |
3482 |
| - | |
| 3463 | + | |
3483 | 3464 |
| |
3484 |
| - | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
3485 | 3477 |
| |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
3486 | 3481 |
| |
3487 | 3482 |
| |
3488 | 3483 |
| |
|
0 commit comments
Comments
(0)