I was wondering if I could replace my usage of set_isolation_level by set_session in some of my code and a comment reminded me why we didn't do it earlier : it does not play well with connection polling.
Apparently psycopg2 already fixed the bug: psycopg/psycopg2#503
Do you think the same strategy could work with psycopg2cffi (ie: construct the begin statement that should be sent to the database)?