Rollback Restores Session Transaction Defaults
@prranitarora▲ 11 net votes
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.