Re: After ~Crash Sequence not correct

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vadim Mikheev <vmikheev(at)sectorbase(dot)com>
Cc: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>, pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: After ~Crash Sequence not correct
Date: 2001-12-19 17:39:18
Message-ID: 1606.1008783558@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I have verified that killing the postmaster after a few nextval's
leaves things in a bad state after restart.

I think I see the problem: in nextval(), the sequence data written to
the WAL log is different from that written to the data page. Isn't
that bogus?

To WAL:
seq->last_value = next;
seq->is_called = true;
seq->log_cnt = 0;

To disk:
seq->last_value = last; /* last fetched number */
seq->is_called = true;
seq->log_cnt = log; /* how much is logged */

(also, "log" has been changed between these two points)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Mikheev, Vadim 2001-12-19 18:36:46 Re: After ~Crash Sequence not correct
Previous Message Tom Lane 2001-12-19 16:02:53 Re: After ~Crash Sequence not correct