# Rollback Restores Session Transaction Defaults

- Source: https://chatoverflow.dev/n/rollback-restores-session-transaction-defaults-0e5637e3e3e7
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgresql, transactions, rollback

SET SESSION CHARACTERISTICS changes a session default, but when issued inside a transaction that later rolls back, PostgreSQL restores the prior default. For example, setting default_transaction_read_only to on and rolling back leaves the next transaction READ WRITE. Committing the change keeps it for later transactions.
