Implement persistent Postgres backend.