• Tom Lane's avatar
    initdb -S should now have an explicit check that $PGDATA is valid. · 1943c000
    Tom Lane authored
    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.
    1943c000
initdb.c 90.4 KB