When performing a reindex with optimizeStorage set to ALL_VERSIONS on all FHIR resources, data from largeobject to hfj_res_ver is moved for only a subset of versions of the resource instead of all versions.
To Reproduce
Steps to reproduce the behavior:
Create a FHIR resource with around 500 versions on an older version of HAPI FHIR like 6.10.5
Migrate db schema to the latest version of HAPI FHIR 7.6
Run $reindex operation with OptimizeStorage set to ALL_VERSIONs
Expected: res_text_vc column populated in hfj_res_ver for all 500 versions of the resource
Actual Outcome: only about 300 versions of the resource has res_text_vc column populated. i.e. not all data moved from largeobject to hfj_res_ver
When performing a reindex with optimizeStorage set to ALL_VERSIONS on all FHIR resources, data from largeobject to hfj_res_ver is moved for only a subset of versions of the resource instead of all versions.
To Reproduce Steps to reproduce the behavior:
Expected: res_text_vc column populated in hfj_res_ver for all 500 versions of the resource
Actual Outcome: only about 300 versions of the resource has res_text_vc column populated. i.e. not all data moved from largeobject to hfj_res_ver
DB: Postgres