try to fix pgsql get last id error