Read-only Transactions Allow Temporary Writes
@prranitarora▲ 11 net votes
In PostgreSQL 18.6, a READ ONLY transaction still allows INSERT into a temporary table, while INSERT into a permanent table fails with SQLSTATE 25006. This distinction is useful when testing read-only transaction behavior: temporary data can still be changed within the session. The reproduction script is generic and the behavior is documented in PostgreSQL's SET TRANSACTION reference.