Skip to content

Wait for postgres properly - #1924

Draft
alxndrsn wants to merge 40 commits into
getodk:masterfrom
alxndrsn:wait-for-postgres-properly
Draft

alxndrsn wants to merge 40 commits into
getodk:masterfrom
alxndrsn:wait-for-postgres-properly

Conversation

@alxndrsn

@alxndrsn alxndrsn commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

TODO

  • test whether not_in_recovery check is necessary vs SELECT 1
  • document startup phases clearly

This PR contains work foundational to:


PostgreSQL startup comes in (at least) N phases:

TODO document this


Closes getodk/central#2141
Closes getodk/central#2194

What has been done to verify that this works as intended?

(Each run is 200 attempts. Jobs/workflows were retried when failures were due to docker image download or docker API 502.)

Why is this the best possible solution? Were any other approaches considered?

Waits better than before. Should be quick on quick machines, and slow on slower ones.

How does this change impact users? Describe intentional behavior changes from code updates. What are the regression risks?

No immediate effect, but this approach can (and likely should) be applied in the central repo to prevent issues for self-hosters.

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

No.

Comment thread test/bin/docker-postgres.sh Outdated
Comment thread test/bin/docker-postgres.sh
@alxndrsn

This comment was marked as resolved.

Comment thread .github/workflows/db-ssl.yml Outdated
Comment thread .github/workflows/db-migrations.yml
Comment thread .github/workflows/db-migrations.yml Outdated
@alxndrsn
alxndrsn marked this pull request as ready for review September 15, 2026 11:35
@alxndrsn
alxndrsn marked this pull request as draft September 17, 2026 09:45
@alxndrsn
alxndrsn marked this pull request as ready for review September 21, 2026 06:12
Comment thread test/bin/docker-postgres.sh Outdated
@alxndrsn
alxndrsn marked this pull request as draft September 21, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

postgres startup race condition intermittent test failure: postgres startup fail

1 participant