Prevent "WARNING: there is already a transaction in progress" lines appearing in PostgreSQL's logs on some occasions.