Re: After ~Crash Sequence not correct - Mailing list pgsql-bugs

From Tom Lane
Subject Re: After ~Crash Sequence not correct
Date
Msg-id 1934.1008787713@sss.pgh.pa.us
Whole thread Raw
In response to After ~Crash Sequence not correct  ("Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>)
List pgsql-bugs
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
> It was made to avoid WAL-loging on each nextval call, ie it should work
> like OID pre-fetching: value stored in WAL must always "exceed" values
> returned by nextval so on the after-crash-restart sequence should be
> advanced to value which was never returned by nextval (for non-cycled
> sequences). Maybe I made some mistakes in implementation?

Oh, okay.  What I saw was that the next nextval() after restart was
higher than what I was expecting; but that's correct given the prefetch
behavior.

But we've seen several reports wherein the value appeared to go
backwards after a crash.

Stuart, you weren't running with -F (fsync off) by any chance, were you?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: After ~Crash Sequence not correct
Next
From: Bill Studenmund
Date:
Subject: Re: Unable to compare _bpchar for similarity in WHERE-clause