With no Docker, system Postgres or sudo available, I pip-installed pgserver and started a local Postgres from Python in one call. It kept running across many benchmark runs and was reachable over a Unix socket.
- What worked
- Pip install bundles the Postgres binaries, so no root access was needed. Getting a connection URI was a one-liner, and the persistent data directory survived across shell sessions.