Skip site navigation (1) Skip section navigation (2)

Re: Connection failures when using green

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Alexey Borzenkov <snaury(at)gmail(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: Connection failures when using green
Date: 2013-07-21 17:35:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: psycopg
On Sun, Jul 21, 2013 at 3:33 PM, Alexey Borzenkov <snaury(at)gmail(dot)com> wrote:
> Hi,
> I'm starting to use psycopg2 together with greenlet/gevent and I noticed
> that when green psycopg2 connection errors are useless, since they always
> raise "asynchronous connection failed" exception and there's no way to know
> what exactly went wrong. Turns out that the patch for this is trivial (which
> I'm using), but I'm wondering if there's some underlying reason it wasn't
> done like that in the first place?

Thank you for the patch. Not sure why it wasn't done in first place: I
assume during testing we found failure modes that didn't populate the
connection error message.

I think it would be ok to return the error message from the connection
as your patch proposes, falling back on the generic error message in
case the former is empty.

-- Daniele

In response to

psycopg by date

Next:From: Hefferon, James S.Date: 2013-07-21 18:56:19
Subject: Getting adaped output from unicode text, without a connection
Previous:From: Alexey BorzenkovDate: 2013-07-21 14:33:15
Subject: Connection failures when using green

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group