tomyeh / postgresql

Dart Postgresql database library.
https://quire.io
BSD 2-Clause "Simplified" License
15 stars 7 forks source link

PooledConnection shall be removed when PG restarts or crashes #20

Closed tomyeh closed 3 years ago

tomyeh commented 3 years ago

When receiving 57P01 and other severe errors, the pooled connection shall be removed from the pool.

In the current implementation, it just notices the caller and reuses the connection. It then causes connect to return a connection in bad state:

WARNING Connection returned in bad state. Removing from pool. state: closed transactionState: none. #pgpool1:49720:13