Closed rklyne closed 9 years ago
I will need help explaining why that travis build failed, only for django 1.8.2 and python 3.3. Doesn't seem right to me but I can't kick off another build to check.
All other open pull requests have similar failures in Travis. I guess there's something unusual but unrelated going on there?
@rklyne I would second adding a new configurable setting for this
@nemesisdesign Sorry, I don't follow you. Do you mean a setting in Travis or one in django-hstore for this change?
Setting added.
This should address issue #93. I've found the problem and solution. My reproduction was different though. Django signals are used to observe every new connection and call psycopg2's register_hstore function on it. Django signals will, by default, store references to the receiver functions as weakrefs. In a low memory situation these can go away and future connections are not registered to use hstore features. The fix is very simple - pass weak=False when connecting the signal.