miracum / fhir-gateway

A thin layer between FHIR REST clients and resource processing pipelines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bigserial for large FHIR-GW Databases

NamUKF opened this issue · comments

commented

Hi,

we have used the FHIR-GW extensively at our site and the included postgres DB has reached the id limit for the id column.
hence we had to alter the id column from serial to bigserial.

See https://www.postgresql.org/docs/current/datatype-numeric.html

alter sequence resources_id_seq as bigint;
alter table resources alter id type bigint;

These command in our case also resulted in some data loss, which is why we had to reload the data.
Hence I would suggest to add to Database Tuning part, to consider bigserial as for the id column, if more data than 2 billion FHIR resources is expected.
This would avoid having need to create DB Dump, altering the structure and restoring the data for the db.