I'm using PostgreSQL 9.0 in production, and have started noticing that statement errors abort an implicit transaction that never gets rolled back. This same issue doesn't appear on my development box, which is at 9.2. I'm not sure if it's a bug, feature, or configuration parameter at this point.
Here's an example of the problem:
$ psql test test=> SELECT foo; ERROR: column "foo" does not exist LINE 1: select foo; ^ test=> SELECT VERSION() ERROR: current transaction is aborted, commands ignored until end of transaction block
Of course, I don't have a transaction to begin with. I realize that PostgreSQL wraps all statements in an implicit single-statement transaction, but in my experience it's never needed to be rolled back when there's an error. I don't require an explicit rollback on my local development instance of PostgreSQL.
The only relevant information I've been able to find online indicated it's a result of
off, but it's set to
on in both environments.
So what is this? A bug? A misconfiguration? How do I resolve it?