[MacPorts] #68119: postgresql15: Initialize database cluster fails
MacPorts
noreply at macports.org
Sun Sep 3 02:29:09 UTC 2023
#68119: postgresql15: Initialize database cluster fails
-------------------------------------------------+-------------------------
Reporter: Klogic1 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: postgresql15, postgresql15-server, |
postgresql_select |
-------------------------------------------------+-------------------------
Comment (by dgilman):
I believe the `getcwd` / `chdir` errors have to do with the postgres
user's home directory, that is a bug, I will investigate a fix.
However, I don't think those are impacting what you're trying to do here.
First, the directions from the postgresql15-server note are to run the
three sudo commands, then you `port load postgresql15-server`. If you try
to `port load` first it will error out for lack of a database cluster.
Next, did you copy the final sudo command correctly into the terminal,
including the single quotes? The `initdb requires an option` suggests some
issue with shell escaping / getting the correct shell command through sudo
su. The full command as you've pasted above is correctly formatted and
should pass the correct `-D` flag to initdb.
Other than the `getcwd` errors I am not able to reproduce this. If you
don't want to use PostgreSQL as a startup service you can also just use
initdb as your own user, in an arbitrary directory in your home dir, and
make a one-off server you start and stop manuall with `pg_ctl`. It's more
docker-like (one database cluster per project) and personally I prefer
using postgres that way.
--
Ticket URL: <https://trac.macports.org/ticket/68119#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list