python - pq: Improve interrupt safety.

From: jwp(at)pgfoundry(dot)org (James William Pye)
To: pgsql-committers(at)postgresql(dot)org
Subject: python - pq: Improve interrupt safety.
Date: 2006-08-06 16:39:29
Message-ID: 20060806163929.70B6886C5EE@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Improve interrupt safety.

Transitions are made interrupt safe by making a successful transition come down
to a single point; iff that point is passed, the transition is complete,
otherwise the step must be performed again. It is up to the user to identify
when a message needs to be processed again(Perhaps some assistance here may
be in order).

Additionally, change the Transaction's API to used regular named methods. After
some -m timeit sessions, named methods appear to be fetched and executed faster
than __call__/__lshift__/etc. (I imagine Python optimizes the common case.)

Modified Files:
--------------
pq/src:
client3.py (r1.22 -> r1.23)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/pq/src/client3.py.diff?r1=1.22&r2=1.23)
element3.py (r1.14 -> r1.15)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/pq/src/element3.py.diff?r1=1.14&r2=1.15)
transam.py (r1.8 -> r1.9)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/pq/src/transam.py.diff?r1=1.8&r2=1.9)
pq/test:
client3.py (r1.9 -> r1.10)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/pq/test/client3.py.diff?r1=1.9&r2=1.10)

Browse pgsql-committers by date

  From Date Subject
Next Message James William Pye 2006-08-06 17:30:42 python - fe: Use new pq/pqueue APIs and improve interrupt safety.
Previous Message Tom Lane 2006-08-06 04:35:22 pgsql: Tweak sanity_check regression test to display more tables (viz,