Fix some postgresql issues now that we're in multisite configuration.