Switch to PostGres so that the database will persist properly.

Hopefully this gets the test working correctly, cos an in-memory SQLite
database wasn't cutting the mustard.