Don't initialize PostGIS-specific stuff for non-db connections

Refs #16969.