prestodb/presto · error · PrestoException
INCOMPATIBLE_CLIENT
INCOMPATIBLE_CLIENT
Error message
Client does not support transactions
What it means
START TRANSACTION requires the client protocol to support transaction handling (the client must be able to hold and pass the transaction ID). If the session does not declare client transaction support, Presto rejects the statement with INCOMPATIBLE_CLIENT.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/execution/StartTransactionTask.java:51
import static com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_TRANSACTION_MODE;
import static com.google.common.util.concurrent.Futures.immediateFuture;
public class StartTransactionTask
implements SessionTransactionControlTask<StartTransaction>
{
@Override
public String getName()
{
return "START TRANSACTION";
}
@Override
public ListenableFuture<?> execute(StartTransaction statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters, String query)
{
Session session = stateMachine.getSession();
if (!session.isClientTransactionSupport()) {
throw new PrestoException(StandardErrorCode.INCOMPATIBLE_CLIENT, "Client does not support transactions");
}
if (session.getTransactionId().isPresent()) {
throw new PrestoException(StandardErrorCode.NOT_SUPPORTED, "Nested transactions not supported");
}
Optional<IsolationLevel> isolationLevel = extractIsolationLevel(statement);
Optional<Boolean> readOnly = extractReadOnly(statement);
TransactionId transactionId = transactionManager.beginTransaction(
isolationLevel.orElse(TransactionManager.DEFAULT_ISOLATION),
readOnly.orElse(TransactionManager.DEFAULT_READ_ONLY),
false);
stateMachine.setStartedTransactionId(transactionId);
// Since the current session does not contain this new transaction ID, we need to manually mark it as inactive
// when this statement completes.
transactionManager.trySetInactive(transactionId);View on GitHub (pinned to 55bb57d202)
Solutions
- Upgrade the client (CLI/JDBC/ODBC driver) to a version supporting transactions.
- Remove explicit START TRANSACTION statements and rely on implicit transaction handling.
- Ensure the client sets the X-Presto-Started-Transaction-Id / client transaction capability headers.
- Verify connection properties (e.g. JDBC) enable transaction support.
Example fix
// before (old driver)
stmt.execute("START TRANSACTION");
// after
// upgrade to a transaction-capable driver, or drop the explicit START TRANSACTION Defensive patterns
Strategy: validation
Validate before calling
// before issuing START TRANSACTION, check the driver/client supports transactions boolean supported = connection.getMetaData().supportsTransactions();
Try / catch
// catch PrestoException with errorCode INCOMPATIBLE_CLIENT; upgrade the driver or fall back to autocommit mode
Prevention
- Pin to a JDBC/CLI driver version that supports Presto transactions
- Avoid explicit START TRANSACTION in tools without transaction protocol support
- Document transaction-support requirements for client integrations
When it happens
Trigger: Executing START TRANSACTION (or an autocommit=false path invoking StartTransactionTask) from a session whose client did not advertise transaction support (session.isClientTransactionSupport() is false).
Common situations: Using an old CLI/JDBC driver or a client that doesn't implement the transaction protocol, running START TRANSACTION through a tool that strips transaction headers, or connecting via HTTP without the transaction-capable client tag.
Related errors
- Result set holdability must be HOLD_CURSORS_OVER_COMMIT
- Invalid transaction isolation level:
- NOT_IN_TRANSACTION
- NOT_SUPPORTED
- INVALID_TRANSACTION_MODE
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/7d7ac60d9e3075f3.
Report an issue: GitHub.