docker
docker copied to clipboard
Worker nodes get error when specifying different PGDATA path
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.