Skip to content

Bug Report: pg_cron.sh references /var/lib/postgresql/data/ directly #136

New issue

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

Open
joeshin opened this issue Feb 4, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@joeshin
Copy link

joeshin commented Feb 4, 2025

Describe the bug

When PGDATA env var is set to override the default data directory, the container errors on startup:

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/pg_cron.sh
shared_buffers = 512MB
max_connections = 200
max_prepared_transactions = 200
max_locks_per_transaction = 512
max_pred_locks_per_transaction = 256
listen_addresses = '*'
shared_preload_libraries = 'pg_cron'
cron.database_name = 'circle_test'
grep: /var/lib/postgresql/data/postgresql.conf: No such file or directory
/docker-entrypoint-initdb.d/pg_cron.sh: line 18: /var/lib/postgresql/data/postgresql.conf: No such file or directory
cat: /var/lib/postgresql/data/postgresql.conf: No such file or directory
cat: /var/lib/postgresql/data/postgresql.conf: No such file or directory

exited with error (exited with 1)

Tracked down this this line:

cimg-postgres/pg_cron.sh

Lines 21 to 22 in 418064b

cat /var/lib/postgresql/data/postgresql.conf | grep shared
cat /var/lib/postgresql/data/postgresql.conf | grep include

To Reproduce
Set PGDATA to any non-default dir.

Expected behavior
Env var is used to avoid errors.

Workarounds
Unsure.

@joeshin joeshin added the bug Something isn't working label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant