(error: unknown)
| 97 | ]) |
| 98 | |
| 99 | function isTransientConnectError(error: unknown): boolean { |
| 100 | const code = getPostgresErrorCode(error) |
| 101 | if (!code) return false |
| 102 | return TRANSIENT_CONNECT_CODES.has(code) || code.startsWith('08') |
| 103 | } |
| 104 | |
| 105 | /** Backend pid of the lock-holding session; a change means the lock was lost. */ |
| 106 | let lockSessionPid = 0 |
no test coverage detected