Open steve-chavez opened 1 month ago
Currently hasql-transaction retries infinitely on code 40001 , this causes problems on replicas as mentioned on https://github.com/PostgREST/postgrest/issues/3673.
40001
Would it be possible to make the retrying behavior on both 40001 and 40P01 optional?
40P01
This is done here https://github.com/nikita-volkov/hasql-transaction/blob/2a9a710bd6230cb0abae84f14f852ab14fc3fa85/library/Hasql/Transaction/Private/Sessions.hs#L48-L49
I guess the functions that execute transactions can be parameterized with a configuration of how error codes should be handled. PR is welcome
Currently hasql-transaction retries infinitely on code
40001
, this causes problems on replicas as mentioned on https://github.com/PostgREST/postgrest/issues/3673.Would it be possible to make the retrying behavior on both
40001
and40P01
optional?This is done here https://github.com/nikita-volkov/hasql-transaction/blob/2a9a710bd6230cb0abae84f14f852ab14fc3fa85/library/Hasql/Transaction/Private/Sessions.hs#L48-L49