The PostgreSQL deployment is broken end to end: no driver or pg_dump in the image, no scheduler, never tested #219

Closed
opened 2026-09-15 21:23:22 +00:00 by tiagoagueda · 0 comments
Owner

docker/compose.postgres.yml and the wiki (Installing Postulo) offer PostgreSQL, but the published image cannot run it. Nothing has exercised this path since the compose file was added in 7675bf10d. Found in the 2026-09-15 code audit.

What is wrong

  • No driver. docker/Dockerfile:79,84 runs uv sync … --extra server only. psycopg lives in the postgres extra (pyproject.toml:43), so the image never has it. The entrypoint's migrate fails when Django tries to load the backend.
  • No pg_dump / pg_restore. The runtime apt line has no postgresql-client, so manage.py backup and restore stop with "pg_dump is not on the PATH" (core/backup.py:131-136,170-172).
  • No scheduler. compose.postgres.yml has no scheduler service, so reminders, gone-quiet notices, store copies and syncs never run on a PostgreSQL install.
  • Never tested. Tests run only on in-memory SQLite (config/settings/test.py:12), and the PostgreSQL backup path is monkeypatched (tests/test_backup.py:223).

Proposal

  • Image: add --extra postgres and postgresql-client matching the compose file's PostgreSQL major. Assert both in tests/test_image_build.py.
  • compose.postgres.yml: add the scheduler profile, and apply the start-order fixes from the scheduler issue (#221).
  • CI: a job with a postgres:17 service that runs the suite, or a marked subset, plus a real backup → restore round trip.
  • Wiki: until this lands, say PostgreSQL is not supported by the published image.
`docker/compose.postgres.yml` and the wiki (*Installing Postulo*) offer PostgreSQL, but the published image cannot run it. Nothing has exercised this path since the compose file was added in `7675bf10d`. Found in the 2026-09-15 code audit. ## What is wrong - **No driver.** `docker/Dockerfile:79,84` runs `uv sync … --extra server` only. `psycopg` lives in the `postgres` extra (`pyproject.toml:43`), so the image never has it. The entrypoint's `migrate` fails when Django tries to load the backend. - **No `pg_dump` / `pg_restore`.** The runtime apt line has no `postgresql-client`, so `manage.py backup` and `restore` stop with "pg_dump is not on the PATH" (`core/backup.py:131-136,170-172`). - **No scheduler.** `compose.postgres.yml` has no `scheduler` service, so reminders, gone-quiet notices, store copies and syncs never run on a PostgreSQL install. - **Never tested.** Tests run only on in-memory SQLite (`config/settings/test.py:12`), and the PostgreSQL backup path is monkeypatched (`tests/test_backup.py:223`). ## Proposal - Image: add `--extra postgres` and `postgresql-client` matching the compose file's PostgreSQL major. Assert both in `tests/test_image_build.py`. - `compose.postgres.yml`: add the scheduler profile, and apply the start-order fixes from the scheduler issue (#221). - CI: a job with a `postgres:17` service that runs the suite, or a marked subset, plus a real backup → restore round trip. - Wiki: until this lands, say PostgreSQL is not supported by the published image.
tiagoagueda added this to the 0.3.0 milestone 2026-09-15 21:33:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Postulo/postulo#219
No description provided.