@@ -219,9 +219,6 @@ fn retry_automatically<T>(
220// Check if a database error can be retried
220// Check if a database error can be retried
221fn error_retryable(error: &postgres::error::DbError) -> bool {
221fn error_retryable(error: &postgres::error::DbError) -> bool {
222− match error.code() {
223− // Caused by lock_timeout being exceeded
222+ // LOCK_NOT_AVAILABLE is caused by lock_timeout being exceeded
224− &postgres::error::SqlState::LOCK_NOT_AVAILABLE => true,
223+ matches!(error.code(), &postgres::error::SqlState::LOCK_NOT_AVAILABLE)