Merge lp:~stub/python-pgbouncer/devel into lp:python-pgbouncer
Proposed by
Stuart Bishop
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 6 | ||||||||||||
Proposed branch: | lp:~stub/python-pgbouncer/devel | ||||||||||||
Merge into: | lp:python-pgbouncer | ||||||||||||
Diff against target: |
129 lines (+35/-27) 3 files modified
pgbouncer/__init__.py (+1/-1) pgbouncer/fixture.py (+32/-24) setup.py (+2/-2) |
||||||||||||
To merge this branch: | bzr merge lp:~stub/python-pgbouncer/devel | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+74885@code.launchpad.net |
Description of the change
Avoid race conditions with pidfile. In fact, ignore the pidfile entirely by running pgbouncer in foreground mode.
Consider the process available when it is accepting socket connections, rather than when it happens to have written its pidfile.
To post a comment you must log in.
Much better approach I think, thanks.
There's a small wart still, as far as I can see: a timeout seems likely to manifest itself in the form of a nonpositive timeout value being passed to the connection call.
That will still raise a timeout-related exception when that happens so it's not altogether wrong, but it might confuse post-mortem analysis. In my quick experiments I get “socket.error: [Errno 115] Operation now in progress” when the timeout is zero, and “ValueError: Timeout value out of range” when it's negative.