Re: Sequence moves forward when failover is triggerred - Mailing list pgsql-general

From Craig Ringer
Subject Re: Sequence moves forward when failover is triggerred
Date
Msg-id 4FFCF762.5040805@ringerc.id.au
Whole thread Raw
In response to Re: Sequence moves forward when failover is triggerred  (Andy Chambers <achambers@mcna.net>)
Responses Re: Sequence moves forward when failover is triggerred
List 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

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Error with plpython
Next
From: Toby Corkindale
Date:
Subject: Bug? Prepared queries continue to use search_path from their preparation time