pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: hankiewicz@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7600: Database crash with data corruption
Date: Sat, 13 Oct 2012 19:10:54 +0800
Message-ID: <50794C3E.3070608@ringerc.id.au> (raw)
In-Reply-To: <E1TMfOh-0003f1-02@wrigleys.postgresql.org>
References: <E1TMfOh-0003f1-02@wrigleys.postgresql.org>

On 10/12/2012 09:35 PM, hankiewicz@gmail.com wrote:
> 5) after recovery was completed we have discovered that sequences on
> production database had wrong values

To follow up on Tom's explanation, if you're relying on sequences not 
having "holes" then your design is dangerously mistaken. A simple 
ROLLBACK throws away any IDs that were obtained from sequences in that 
transaction.

If you're saying that the sequence is wrong in that it's LOWER than IDs 
present in the table, then that's a problem.

--
Craig Ringer




view thread (6+ messages)  latest in thread

Message-ID: <50794C3E.3070608@ringerc.id.au>
Permalink:  ../50794C3E.3070608@ringerc.id.au/
Also on:    postgresql.org/message-id/50794C3E.3070608@ringerc.id.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ringerc@ringerc.id.au, hankiewicz@gmail.com
  Subject: Re: BUG #7600: Database crash with data corruption
  In-Reply-To: <50794C3E.3070608@ringerc.id.au>
  References: <E1TMfOh-0003f1-02@wrigleys.postgresql.org> <50794C3E.3070608@ringerc.id.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox