Re: [GENERAL] currval and DISCARD ALL

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, Nigel Heron <nigel(at)psycode(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] currval and DISCARD ALL
Date: 2013-04-16 21:30:29
Message-ID: CAFcNs+o8pgQLze3h0GfZieiS7CU=74gTNFfA6nOoBkrwSVdXdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, Apr 16, 2013 at 6:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>
> [...]
>
> Or, if you'd rather a more direct answer: wanting this sounds like
> evidence of bad application design. Why is your app dependent on
> getting failures from currval, and isn't there a better way to do it?
>
>
The sequence cache (seqtab) is used per each backend, so if we use a
connection pooler (like pgbouncer in session mode) between our app and
postgres we can get a wrong value from 'currval' because the backend isn't
completely clean.

This isn't it a good reason to implement this feature?

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lee Hachadoorian 2013-04-16 21:46:20 SQL keywords are suddenly case sensitive
Previous Message Tom Lane 2013-04-16 21:09:19 Re: [GENERAL] currval and DISCARD ALL

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2013-04-16 21:41:30 Re: Enabling Checksums
Previous Message Tom Lane 2013-04-16 21:20:18 Re: Enabling Checksums