Fix pg_upgrade issue