citusdata / docker

:ship: Docker images and configuration for Citus
Apache License 2.0
241 stars 100 forks source link

Worker nodes get error when specifying different PGDATA path #310

Open ghost opened 2 years ago

ghost commented 2 years ago

When specifying a different PGDATA path value (ex: attaching another volume to /pgdata), worker nodes will get an error on startup because the postgres user does not own the directory. The coordinator node handles this fine because it changes the directory's ownership automatically.

Prepending wait-for-manager.sh with chown -R postgres "$PGDATA" fixes the issue.