pgadapter icon indicating copy to clipboard operation
pgadapter copied to clipboard

Analyze statements could always use separate single-use (read/write) transactions

Open olavloite opened this issue 2 years ago • 0 comments

If the client is executing a DescribeStatement message flow to create a prepared statement, it will often use an implicit transaction for it. Queries will in that case use a single-use read-only transaction. Updates however require the transaction type to be a read/write transaction. Read/write transactions are normally never created as single-use transactions, as a message replay would cause the transaction to be replayed. A transaction consisting only of a single analyzeUpdate statement is however replay-safe, and could use a single-use read/write transaction.

olavloite avatar Nov 11 '22 12:11 olavloite