Re: Problem with psycopg2 and asyncio - Mailing list psycopg

From Frank Millman
Subject Re: Problem with psycopg2 and asyncio
Date
Msg-id D97F59D714E849A2AC336173CE85CE99@FrankLaptop
Whole thread Raw
In response to Re: Problem with psycopg2 and asyncio  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Responses Re: Problem with psycopg2 and asyncio
List psycopg
On 29/02/16 18:07, Daniele Varrazzo wrote:
>
> On Mon, Feb 29, 2016 at 2:52 PM, Frank Millman <frank@chagford.com> wrote:
>
> > Of course I may just be doing something silly, in which case I would be
> > delighted if someone pointed it out.
>
> Are you running psycopg in async mode or in green mode?
>
To be honest, I don’t know what that means, so I am probably running in green mode.
 
I am aware that psycopg2 has some extensions that enable asynchronous communication, but I am not using any of those.
 
To repeat what I replied to Michael,
I still think that my theory holds water. Run the database in its own thread, pass requests to it using a queue.Queue(), and pass results back using an asyncio.Queue(). It works brilliantly for the other two databases, and I cannot see any reason why it should not work with psycopg2.
 
Frank
 

psycopg by date:

Previous
From: "Frank Millman"
Date:
Subject: Re: Problem with psycopg2 and asyncio
Next
From: Daniele Varrazzo
Date:
Subject: Re: Problem with psycopg2 and asyncio