Re: Issue with DateStyle and pgbouncer

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Issue with DateStyle and pgbouncer
Date: 2013-03-18 19:26:33
Message-ID: CA+mi_8ZjViRvUAyWgg3cfkA-8YL4xtnPUkUb1hFr2Wt-QxD-VQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: psycopg

On Mon, Mar 18, 2013 at 7:15 PM, Marko Kreen <markokr(at)gmail(dot)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

In response to

Browse psycopg by date

  From Date Subject
Next Message P. Christeas 2013-03-19 07:59:10 progress with the "binary mode" cursor
Previous Message Marko Kreen 2013-03-18 19:15:53 Re: Issue with DateStyle and pgbouncer