Open evgeni opened 8 months ago
I'm not sure the systemd check is relevant. Debian also starts it via systemd, but somehow does read data_directory
via postgresql.conf
.
Debian uses /usr/bin/pg_ctlcluster
to start, which is a perl script. That sets -D $info{'pgdata'}
. My perl isn't great, but I think it reads postgresql.conf
to get the value.
The official postgresql.org packages on Red Hat match what the distro packages do:
Environment=PGDATA=/var/lib/pgsql/13/data/
ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA}
I'm not sure the systemd check is relevant. Debian also starts it via systemd, but somehow does read
data_directory
viapostgresql.conf
.
Well, this is where we set PGDATA explicitly. So it was a safe start.
Debian uses
/usr/bin/pg_ctlcluster
to start, which is a perl script. That sets-D $info{'pgdata'}
. My perl isn't great, but I think it readspostgresql.conf
to get the value.
-D
really means "find postgresql.conf in that directory and run with it", which can point at a data_directory
somewhere completely different (see https://www.postgresql.org/message-id/3566642.1618422939%40sss.pgh.pa.us)
The official postgresql.org packages on Red Hat match what the distro packages do:
Environment=PGDATA=/var/lib/pgsql/13/data/ ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA}
"good"
Fixes: #1576
Summary
see subject and linked issue
Additional Context
Add any additional context about the problem here.
Related Issues (if any)
1576
Checklist
puppet apply
)