Testing against PostgreSQL

Updated Jul 27, 2026

Integration tests and developer machines can exercise the postgres backend by installing the helper from crates.io and running it before make test:

cargo install --locked pg-embed-setup-unpriv
pg_embedded_setup_unpriv

The helper stages a PostgreSQL distribution with unprivileged ownership, so the postgresql_embedded crate can start temporary clusters without root access. After invoking the helper, run make test to execute sqlite, postgres, and wireframe-only suites; the postgres jobs automatically reuse the staged binaries. Both server binaries honour the same MXD_DATABASE and --database values, allowing the helper to be re-run once and then switching between cargo run --bin mxd and cargo run --bin mxd-wireframe-server without additional setup. Refer to docs/pg-embed-setup-unpriv-users-guide.md for cluster path customization and privilege troubleshooting details.