Re: [GENERAL] currval and DISCARD ALL - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: [GENERAL] currval and DISCARD ALL
Date
Msg-id CAFcNs+o8pgQLze3h0GfZieiS7CU=74gTNFfA6nOoBkrwSVdXdg@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] currval and DISCARD ALL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Apr 16, 2013 at 6:09 PM, Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Enabling Checksums
Next
From: Ants Aasma
Date:
Subject: Re: Enabling Checksums