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.
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.