Repository navigation
Version 2.6.0
Driver
Added
-
SessionTerminatedException: a session the server ended arrives as the reason the server gave -
TRANSACTION_TIMEOUT,IDLE_SESSION_TIMEOUT,ADMINISTRATOR_COMMANDorUNKNOWN. The next call on the session
names the same reason, and a pool evicts the connection. -
@Transactional(timeout = …)is enforced byOctaviusJdbcTransactionManager, and so are a
TransactionTemplate's timeout andspring.transaction.default-timeout.timeoutScopepicks the setting:
STATEMENT(statement_timeout, the default) orTRANSACTION(transaction_timeout). -
The auto-configured transaction manager takes Boot's transaction manager customizers, so the
spring.transaction.*properties and aTransactionManagerCustomizerbean reach it.
Changed
-
[BREAKING]
ExecutionAbortedExceptionReasonandExecutionAbortedException.reasonare gone:25P03and25P04
areSessionTerminatedException(TRANSACTION_TIMEOUT)now. Awhenover the enum or code readingreasonstops
compiling, and acatchofExecutionAbortedExceptionno longer sees either timeout. -
[BREAKING] A
FATALisSessionTerminatedExceptionwhatever its SQLSTATE, where anERRORwith the same code
routes as before:FATAL 57P01is not aDatabaseSystemException, norFATAL 40001aConcurrencyException. -
[BREAKING] A login the server refuses is
InitializationExceptionwhatever its SQLSTATE -
SERVER_REJECTED_CREDENTIALSfor class28,CONNECTION_ERRORwith the code insqlStatefor the rest. -
A
SQLExceptionWrapperover a terminated session chains a next exception with SQLSTATE08006, so a pool evicts
the connection at once rather than at its next validation. -
Each exchange reads what the server sent since the last one before writing anything, so a
FATALthat arrived
while the session sat idle is reported without the statement being sent. -
OctaviusJdbcTransactionManagerstays quiet on a rollback that finds the connection gone, where the rollback's
failure replaced the application's exception. -
[BREAKING]
writeToCopyreports a row the server rejected rather than sending the next chunk, and the
InputStreamoverload ofcopyInstops reading its input there. AcatcharoundendCopy()alone no longer sees a
row rejected mid-transfer. -
[BREAKING] The auto-configured transaction manager stands back from any
TransactionManagerthe application
declares, as Boot's does, a reactive one included. An application with a reactive one has to declare Octavius's
itself. -
[BREAKING] An unqualified type name the search path does not reach is refused, naming the schemas that have it,
where the driver took it from the one schema defining it. A registration or awithPgTypename without its schema
fails where the path does not reach it. -
[BREAKING] No temporary type is in the catalog, a temporary table's row type among them. A whole row of a
temporary table now fails when the result is described; cast it to a permanent composite. -
[BREAKING] A codec declaring OID
0is refused byregisterCodec, with
InvalidOperationException(INVALID_ARGUMENT). A registration declaring0throws where it used to pass. -
A data class mapped reflectively allocates about half as much read, and as much as a hand-written converter
written as a composite.
Fixed
-
A
FATALis reported as itself, where the driver reported the closed connection after it, or waited for the
close for good under the default socket timeout. A failed write reports it too on a plain connection, and so does
a listener loop the server ends. -
Closing a pooled session over a broken connection lets the pool evict the connection. The pool went on counting
it as borrowed, so a single socket timeout exhausted a pool of one. -
cancelCopy()on a connection that has gone does nothing, so thecopyIn/copyOutoverloads that cancel on
failure report the failure, not the cancel's. -
A
transactionTimeoutholds under atransaction_timeoutdefault set on the database, the role or the session,
where it was ignored. -
With several
DataSourcebeans the Spring auto-configuration builds on the@Primaryone, and with none primary
contributes nothing, instead of failing the startup. -
The auto-configured transaction manager can be injected as
OctaviusJdbcTransactionManagerby a bean created
before it. -
[BREAKING] The JDBC
Statementfails in aSQLExceptionWrapper, as the connection does, so Spring's script
runner recognizes the failure:spring.sql.init.continue-on-errorcarries on past it, and without it the failure
names its script and statement. Acatchof the driver's exception around aStatementno longer sees it;
wrappedExceptionholds it. -
A server certificate signed with RSASSA-PSS is hashed for channel binding with the digest in the signature's
parameters, as the server hashes it: over SHA-384 or SHA-512 a login underchannelBinding=preferfailed. -
A server certificate signed with Ed25519 or Ed448 is refused before the SCRAM exchange, under
channelBinding=preferas underrequire, withInitializationException(UNSUPPORTED_MECHANISM)naming
channelBinding=disable. -
[BREAKING] An unqualified type name resolves to the type the server picks for it, the reported
search_pathbeing
read as the server reads it:$user,pg_catalogfirst unless listed, unquoted names folded. A type of your own
named like a built-in one -money,point- now resolves to the built-in where no schema is given, and a schema
named after the user is searched where$userstands. -
[BREAKING] A result converter registered under a sealed class is offered every class below it, as a codec for a
sealed class already was: one underPgIntervalwas never asked about aninterval. Such a converter is now asked
ahead of those underAny::class.
Client
Changed
- [BREAKING] A login the server refuses is thrown under
dbResult,transactionResultandasResult, as every
session that could not be obtained is. AFailurebranch that handled53300or57P03no longer sees them.