Possibly due to an incorrect call to Py_DECREF in multicornExecForeignInsert (update and delete may also be affected), the refcount of None decreases by 6 references on each insert, eventually causing the above error.
Running log_to_postgres(sys.getrefcount(None)) indicates the decreasing refcount.
Possibly due to an incorrect call to Py_DECREF in multicornExecForeignInsert (update and delete may also be affected), the refcount of None decreases by 6 references on each insert, eventually causing the above error.
Running log_to_postgres(sys.getrefcount(None)) indicates the decreasing refcount.