Commit 99f50dd
committed
initdb -S should now have an explicit check that $PGDATA is valid.
The fsync code from the backend essentially assumes that somebody's already
validated PGDATA, at least to the extent of it being a readable directory.
That's safe enough for initdb's normal code path too, but "initdb -S"
doesn't have any other processing at all that touches the target directory.
To have reasonable error-case behavior, add a pg_check_dir call.
Per gripe from Peter E.1 parent 70a4519 commit 99f50dd
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3726 | 3726 | | |
3727 | 3727 | | |
3728 | 3728 | | |
3729 | | - | |
| 3729 | + | |
3730 | 3730 | | |
3731 | 3731 | | |
3732 | 3732 | | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
3733 | 3742 | | |
3734 | 3743 | | |
3735 | 3744 | | |
| |||
0 commit comments