Repository navigation
Enable PostgreSQL as the default database for rhdh-local - #324
NiallTwomey2 wants to merge 11 commits into
Conversation
rm3l
left a comment
There was a problem hiding this comment.
@NiallTwomey2 Looks like CI is failing on this PR. Could you please take a look?
|
@rm3l The CI has passed. Podman does not cause the CI checks to fail anymore. |
Fortune-Ndlovu
left a comment
There was a problem hiding this comment.
Thanks for the RHIDP-16882 work. The overall approach looks good: Postgres in the default compose file, pg client in app-config, startup wait, and NO_PROXY for db behind the corporate proxy overlay.
Before merge, please align the PR description with the code, add (or explicitly defer) the CI check for plugin databases, and pin the default Postgres image by digest instead of :latest.
Details are on the inline comments.
|
|
We never wanted PostgreSQL to be on by default so we could keep the resource overheads low. Why do we need this now? |
|
@benwilcock In memory |
@benwilcock After some issues affecting only the SQLite backend in the core RHDH image (e.g.: RHDHBUGS-3753), we realized that we actually only support RHDH against PostgreSQL in all our other install methods. So we thought it might make sense to stay consistent here. Otherwise, that would mean that:
On resource overhead, the Postgres container uses ~170-190 MB of memory and CPU stays around ~1%. This seems negligible next to the default RHDH container (~413 MB mem / ~7% CPU) and lightspeed-core one (~337 MB mem / ~5% CPU). See the podman stats with Postgres running for some time: We thought 2.1 might be a good opportunity for this change. And that being said, if needed, users can always switch back to SQLite if needed by updating their app-config.local.yaml/compose.override.yaml accordingly. |



Description
Enable PostgreSQL as the default database for RHDH Local (RHIDP-16882 / RHIDP-16883).
dbis incompose.yaml, image${POSTGRES_IMAGE:-quay.io/fedora/postgresql-18:latest}/var/lib/pgsql/datacompose stop/start/restartkeep data;compose downthencompose upstarts a new empty volume (RHDH does not support DB downgrades)rhdhdepends_on: db(healthy)app-config.yamlusesclient: pgandPOSTGRES_*fromdefault.envWITH_POSTGRES,app-config.db.yaml,compose-with-db.yamlwait-for-plugins-and-start.shwaits for$POSTGRES_HOST:$POSTGRES_PORTbefore starting nodeNO_PROXY=localhost,127.0.0.1app-config.local.yamloverridePOSTGRES_IMAGE=registry.redhat.io/rhel10/postgresql-18:latestin.envplus registry loginWhich issue(s) does this PR fix or relate to
Relates to RHIDP-16882
Relates to RHIDP-16883
Follow up issue RHIDP-16884 - CI check that the effective RHDH config is client: pg (Postgres, not SQLite) after the stack is healthy.
PR acceptance criteria
How to test changes / Special notes to the reviewer
Postgres uses an anonymous volume at
/var/lib/pgsql/data.podman compose stopthenstart(orrestart)podman compose downthenpodman compose up -dpodman compose down --volumesthenpodman compose up -d