On Tue, 18 Nov 2014 18:58:13 +0100, Sönke Ludwig wrote:

In the latter case, it seems like there is a PostgresDB class that
contains a connection pool to deal with the issue. Using
db.lockConnection.someOperation(...) in each task should always use a
connection exclusive for that task, so that no protocol level issues
should arrise from yielding.

Yes, that was the solution. (Hat tip to etcimon, for the feedback on the github issue).

BTW, I suppose I was too quick to judge ddb on this issue, but that was due to previous frustrations with it :o)