avoid multiple download when reading file, fix pg's seq