2026-04-23 Postgres backend report
2026-04-23 Postgres backend report
Section titled “2026-04-23 Postgres backend report”Test delta
Section titled “Test delta”- Default SQLite backend suite:
311 passedviapython -m pytest -p no:schemathesis app/backend/tests/ -q --basetemp .pytest-tmp - New Postgres-focused smoke coverage:
6 passedviapython -m pytest -p no:schemathesis app/backend/tests/test_postgres_backend.py -q --basetemp .pytest-tmp - Scope added in this change:
- backend factory and wrapper selection
- Postgres CRUD/query smoke coverage
- concurrent write smoke coverage
- startup/snapshot gating for Postgres
- Postgres readiness checks
Benchmarks
Section titled “Benchmarks”Local p95 latency, single-user case, 200 seeded projects:
| Operation | SQLite p95 | Postgres p95 |
|---|---|---|
get_project | 3.312 ms | 4.605 ms |
list_projects | 11.010 ms | 11.078 ms |
query_projects(metric_type="binary") | 7.249 ms | 8.484 ms |
Result:
- Postgres stayed within the acceptance guard for single-user usage
- worst observed regression in this local run was
~1.39xonget_project list_projectswas effectively flat between backends in the local benchmark
CI runtime impact
Section titled “CI runtime impact”- Existing SQLite backend suite runtime in local verification:
208.92 s - New Postgres smoke suite runtime in local verification:
29.70 s - Expected GitHub Actions impact:
- roughly
+30-90 sfor the new job after warm image cache - potentially
+1-2 minon cold runners because of Postgres image/bootstrap overhead
- roughly
- SQLite remains the default path when
AB_DATABASE_URLis unset - HF snapshot sync is intentionally skipped for Postgres runtimes
- CI still keeps the original default verification job for SQLite; Postgres is covered by a dedicated Ubuntu smoke job