Re: Issue with DateStyle and pgbouncer - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Issue with DateStyle and pgbouncer
Date
Msg-id CA+mi_8ZjViRvUAyWgg3cfkA-8YL4xtnPUkUb1hFr2Wt-QxD-VQ@mail.gmail.com
Whole thread Raw
In response to Re: Issue with DateStyle and pgbouncer  (Marko Kreen <markokr@gmail.com>)
List psycopg
On Mon, Mar 18, 2013 at 7:15 PM, Marko Kreen <markokr@gmail.com> wrote:
> On Mon, Mar 18, 2013 at 01:53:29PM +0000, Daniele Varrazzo wrote:
>> trawling on twitter and lurking on github I've intercepted some cries
>> of pain caused by psycopg+pgbouncer regarding DateStyle. psycopg only
>> works with ISO style dates: usually it knows the DateStyle on
>> connection [1] and changes it if the setting isn't compatible.
>> Unfortunately pgbouncer doesn't send the DateStyle setting on
>> connection, and psycopg conservatively sets DateStyle to ISO when the
>> information is missing: on pgbouncer this may mean an extra query
>> every query. Not amusing.
>
> I assume you are talking about the bug fixed in PgBouncer 1.4?
>
> Or are there problems with more recent versions of PgBouncer?

I assume whatever they use at Instagram:

https://github.com/Instagram/psycopg2/commit/6f02e8f214e751568f38140d747fb6f93063a847

I remember having reported the issue to PgBouncer a long time ago, but
apparently somebody's still affected.

-- Daniele


psycopg by date:

Previous
From: Marko Kreen
Date:
Subject: Re: Issue with DateStyle and pgbouncer
Next
From: "P. Christeas"
Date:
Subject: progress with the "binary mode" cursor