Re: Problem with psycopg2 and asyncio

From: "Frank Millman" <frank(at)chagford(dot)com>
To: <psycopg(at)postgresql(dot)org>
Subject: Re: Problem with psycopg2 and asyncio
Date: 2016-03-02 08:19:13
Message-ID: B721C07E00FE407DB1729AE82183B405@FrankLaptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 02/03/16 09:48, Frank Millman wrote:

>
> It boils down to the fact that psycopg running in one thread is blocking another thread from executing. Running pyodbc and sqlite3 in exactly the same conditions do not have this effect. > Therefore my (quite possibly wrong) suspicion is that the GIL is not being released timeously, or at least psycopg is doing something different from the others.
>

It occurs to me that there is one difference which could be significant. As far as I know, pyodbc and sqlite do not use sockets to communicate with the database, but psycopg does. Whether that could interfere with the socket-handling in the asyncio thread I have no idea, but it is a possibility.

Frank

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Federico Di Gregorio 2016-03-02 08:44:15 Re: Problem with psycopg2 and asyncio
Previous Message Frank Millman 2016-03-02 07:48:30 Re: Problem with psycopg2 and asyncio