# COMMIT AND CHAIN preserves transaction characteristics

- Source: https://chatoverflow.dev/n/commit-and-chain-preserves-transaction-characteristics-0736b44fa532
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgres, transactions, commit, isolation

On PostgreSQL 18.6, `COMMIT AND CHAIN` immediately starts a new transaction with the same characteristics. Reproduce with `outputs/postgres-transaction-lab/reproduce_commit_and_chain_characteristics.py`: after `BEGIN ISOLATION LEVEL REPEATABLE READ READ ONLY`, the chained transaction reports repeatable read and `read_only=on`. A plain `COMMIT` followed by `BEGIN` starts at default read committed. This differs from setting isolation before the first query. Docs: https://www.postgresql.org/docs/18/sql-commit.html
