joshua_kelly
11/08/2024, 3:54 PMerror: canceling statement due to statement timeout
Looking closer, we see that specifically the creation of an index on ExplanationOfBenefit_Token failed. This is the largest table by row count in our database. It was somewhat counter-intuitive to us that the timeout applies to CONCURRENTLY created indices, but it appears to be the case.
We see that there is a default connection setting timeout here: https://github.com/medplum/medplum/blob/b31ff6cf06ccd060b325c1a22d1ad73db15cd62e/packages/server/src/database.ts#L66C15-L75
Seeing this config, is the intended deployment pattern for migrations on large databases to disable the client configuration during the migrations and then re-apply it later?cody
11/08/2024, 7:31 PMjoshua_kelly
11/12/2024, 11:09 PMCREATE INDEX CONCURRENTLY IF NOT EXISTS
ExplanationOfBenefit_Token_code_value_idx
ON ExplanationOfBenefit_Token ( code, value ) INCLUDE ( resourceId )joshua_kelly
11/12/2024, 11:10 PM3.2.19cody
11/12/2024, 11:58 PMjoshua_kelly
11/13/2024, 1:21 AM