Re: Sequence moves forward when failover is triggerred

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Andy Chambers <achambers(at)mcna(dot)net>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sequence moves forward when failover is triggerred
Date: 2012-07-11 03:47:46
Message-ID: 4FFCF762.5040805@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/11/2012 07:23 AM, Andy Chambers wrote:
>
> I think I made a poor decision by having our application generate
> checkbook numbers on demand using sequences.

Sure did. Sequences are exempt from most transactional rules; that's why
they're fast and lock-free.

I'm surprised to find that the only mention of this is at the very
bottom of this page:

http://www.postgresql.org/docs/9.1/static/functions-sequence.html

as it's an important property of sequences and one that shouldn't just
be a footnote.

I'd use a real table for this job.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Berend Tober 2012-07-11 05:01:59 Re: Sequence moves forward when failover is triggerred
Previous Message Craig Ringer 2012-07-11 03:43:56 Re: Error with plpython