I have noticed in some cases the warning messages appear twice, one such instance is given below: postgres=# begin; BEGIN postgres=# prepare transaction 't1'; PREPARE TRANSACTION postgres=# rollback; WARNING: there is no transaction in progress WARNING: there is no transaction in progress ROLLBACK
However if logging is enabled, the warning message appears only once.
I'm not sure if this is already known.
I'm not sure if this is widely used scenario or not.