Add support for multiple PostgreSQL DSN candidates
All checks were successful
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 7s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 17s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 19s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 18s

This update introduces `PG_DSN_CANDIDATES` for specifying multiple DSN options, improving compatibility and CI portability. The script now attempts connections sequentially using the provided candidates before falling back to single DSN or raising an error. Relevant updates to documentation and workflow configuration have also been made.
This commit is contained in:
2026-02-12 14:36:07 +01:00
parent a0ba4e1314
commit ff6d7998c3
3 changed files with 37 additions and 4 deletions

View File

@@ -106,6 +106,13 @@ PG_DSN='postgresql://postgres:postgres@127.0.0.1:5432/compatdb?sslmode=disable'
python backend/scripts/pg_compat_smoke.py
```
CI/runner-safe variant (tries multiple hosts):
```bash
PG_DSN_CANDIDATES='postgresql://postgres:postgres@postgres:5432/compatdb?sslmode=disable,postgresql://postgres:postgres@127.0.0.1:5432/compatdb?sslmode=disable' \
python backend/scripts/pg_compat_smoke.py
```
## Environment variables reference
All variables are defined in `.env.example`.