Troubleshooting creation of `datahub` database in standalone Postgres via Helm deployment chart

Original Slack Thread

Hi Team I am using a standalone Postgres db Is there a way for me to create the datahub database needed in the my standalone db via the deployment helm chart ?

psql: error: connection to server at "181.00.00.1", port 5432 failed: FATAL: database "datahub" does not exist
fyi postgresqlSetupJob enabled: true

https://datahubspace.slack.com/archives/CV2UVAPPG/p1635524780037000

@indy prentice might be able to speak to this!

<@U01GZEETMEZ> might be able to speak to this!

cc <@U04UKA5L5LK>

Tagging this week’s oncall <@U03MF8MU5P0>!

<@U055G86SQ90> do you see the same logs as in that slack thread? We have this code https://github.com/datahub-project/datahub/blob/48b3d7afa0ee4442cb4d1bd228839cf6becfc452/docker/postgres-setup/init.sh#L5 in the script that’s supposed to create the db, but it sounds like the very first psql command isn’t running?

<datahub/docker/postgres-setup/init.sh at 48b3d7afa0ee4442cb4d1bd228839cf6becfc452 · datahub-project/datahub · GitHub 5> should have the -d postgres that is causing it to fail

Yes I see the same error log as the thread, also I posted my error on this thread
https://datahubspace.slack.com/archives/CV2UVAPPG/p1693942922451589?thread_ts=1693937473.676269&amp;cid=CV2UVAPPG

Does this PR look reasonable? https://github.com/datahub-project/datahub/pull/8800

looks good to me