We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Today, we always set data_directory = … in postgresql.conf via
data_directory = …
postgresql.conf
puppetlabs-postgresql/manifests/server/instance/config.pp
Lines 222 to 225 in 411e7bc
However we also set it in the systemd override:
puppetlabs-postgresql/manifests/server/instance/systemd.pp
Lines 29 to 34 in 411e7bc
puppetlabs-postgresql/templates/systemd-override.conf.epp
Line 11 in 411e7bc
And pass it when calling initdb:
initdb
puppetlabs-postgresql/manifests/server/instance/initdb.pp
Line 153 in 411e7bc
The problem is that setting data_directory in the config actually overrides the -D parameter on the CLI and the PGDATA environment variable, as can be seen in e.g. https://bugzilla.redhat.com/show_bug.cgi?id=1935301 thus possibly breaking future actions against this DB (see the link for an example, also https://www.postgresql.org/message-id/3566642.1618422939%40sss.pgh.pa.us).
data_directory
-D
PGDATA
data_directory not set in postgresql.conf when systemd is used and thus the environment variable is present
install a postgresql setup :)
This is the exact opposite of #510 🤷♀️
The text was updated successfully, but these errors were encountered:
don't set data_directory in config when we configure it via env
7fa31c2
Fixes: puppetlabs#1576
4c46072
Successfully merging a pull request may close this issue.
Describe the Bug
Today, we always set
data_directory = …
inpostgresql.conf
viapuppetlabs-postgresql/manifests/server/instance/config.pp
Lines 222 to 225 in 411e7bc
However we also set it in the systemd override:
puppetlabs-postgresql/manifests/server/instance/systemd.pp
Lines 29 to 34 in 411e7bc
puppetlabs-postgresql/templates/systemd-override.conf.epp
Line 11 in 411e7bc
And pass it when calling
initdb
:puppetlabs-postgresql/manifests/server/instance/initdb.pp
Line 153 in 411e7bc
The problem is that setting
data_directory
in the config actually overrides the-D
parameter on the CLI and thePGDATA
environment variable, as can be seen in e.g. https://bugzilla.redhat.com/show_bug.cgi?id=1935301 thus possibly breaking future actions against this DB (see the link for an example, also https://www.postgresql.org/message-id/3566642.1618422939%40sss.pgh.pa.us).Expected Behavior
data_directory
not set inpostgresql.conf
when systemd is used and thus the environment variable is presentSteps to Reproduce
install a postgresql setup :)
Environment
Additional Context
This is the exact opposite of #510 🤷♀️
The text was updated successfully, but these errors were encountered: