Currently, the Postgres modules are always imported regardless of whether PG is being used. Fix this so that it's conditionally imported as required.