transactionState

The transaction state as the session reports it: the server's, with the BEGIN still waiting counted in.

With auto-commit off this is IN_TRANSACTION before the first statement too. The transaction is open from the caller's side from the moment auto-commit goes off; that the server hears of it only when a statement arrives is how it is opened, not a state of its own.