Note that not all DBs use the same mechanism to "reset" the testing site at the begin of each test case.
It sounds to me that some DBs use transactions for that, so one simple rollback will reset everything, while others perform a sort of delete + re-insert.
Perhaps Postgres is using the rollback way, meaning it starts a transaction, leading to the error when transactions_forbidden() is used in the middle of a test.
Just in case it helps to clarify why it may be breaking only for postgres. Perhaps the solution is to hack the transactions_forbidden when running tests. I'd ask Petr, sure he knows better.