Debugging the switch to PostgreSQL