Repository navigation
0.9.1
A fix release for PostgreSQL. Not a breaking API change: EventLogError keeps its variants. It is a behaviour change for a caller that matches only UnknownCommit: a guarded append, append group or blob group whose deadline fires before COMMIT was written now returns Deadline, which means it did not commit and is safe to retry with the same command identity. UnknownCommit now means COMMIT was sent.
Fixed
-
PostgreSQL: a connection retired from the pool (a lease dropped without settling, after a
deadline or a cancelled call) now closes when its lease drops, on the dropping thread. Before,
the close ran in a spawned task, so on a caller's current-thread runtime it waited for the
caller's next call, and the abandoned transaction stayed open, idle in transaction and holding
its locks, until the server's own timeout. -
PostgreSQL: a backend blocked inside a query when its lease is retired (for example an append
waiting on a lock at its deadline) no longer keeps its advisory and row locks. The pool sends the
server a cancel for it from a thread of its own, and every session sets
client_connection_check_interval(1 s), so a backend whose client is gone aborts its query even
where no cancel can be sent (aPostgresConnectionAuthorityconnection gets no cancel). A server
that does not know the setting (PostgreSQL 13) or cannot honour it (no closed-socket detection)
is still admitted, relying on the cancel alone. Pool capacity still returns only after the
retirement and its cancel attempt are accounted. -
PostgreSQL: a retirement whose close task is dropped with the caller's runtime (a caller that
builds a runtime per call) no longer leaves the lease counted as checked out, which had made
every latershutdownmiss its deadline. -
PostgreSQL:
append_guarded,append_group_guardedandappend_group_with_blobs_guardedreturn
EventLogError::Deadline { operation: "store operation" }when the store-operation deadline fires
before COMMIT was written, andUnknownCommitonly once COMMIT was sent. Before, every deadline
wasUnknownCommit, even when nothing could have committed. The two outcomes are named
eventlog.pool.TimedOutWriteiness/pool/.Not a breaking API change:
EventLogErrorhas the same variants. It is a behaviour change for a
caller that matches onlyUnknownCommitand treats every other error as final: such a timeout
now arrives asDeadline, which means "did not commit; retry", and is safe to retry with the
same command identity. A caller that already handlesDeadlinefrom the other bounded
operations needs no change.