fix a pg_resource