Re: Sequences - jumped after power failure

From: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>
To: steve(at)retsol(dot)co(dot)uk
Cc: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Sequences - jumped after power failure
Date: 2008-04-15 09:47:33
Message-ID: 264855a00804150247m6c683943la137afd74870c344@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Apr 15, 2008 at 4:21 AM, Steve T <steve(at)retsol(dot)co(dot)uk> wrote:
>
> Is it possible for a whole set of sequences to suddenly 'jump'?
>
> I have a set of claims tables that cover the claim itself, the customer,
> contact points etc. Yesterday there was a power failure and the server
> suffered an immediate power outage. When the server came back, everything
> seemed fine, apart from the fact that the claim related sequences had all
> jumped and left a gap of 33 (last was 52 before power failure, next one
> allocated after power failure 85). This seems consistent across all the
> tables related to the claim (it may be across the tables in the database -
> I haven't checked all of them as yet).
>
> Does this sound feasible and if so, what is the cause?

One explanation: if there were uncommitted transactions at the time of
the power failure, the sequence would have been advanced, but the
corresponding rows would not have entered the database.

Sean

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Steve T 2008-04-15 10:07:18 Re: Sequences - jumped after power failure
Previous Message Steve T 2008-04-15 08:21:05 Sequences - jumped after power failure