Skip site navigation (1) Skip section navigation (2)

Re: Bug #613: Sequence values fall back to previously chec

From: "'Ben Grimm'" <bgrimm(at)zaeon(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Vadim Mikheev" <vmikheev(at)sectorbase(dot)com>,"Tom Pfau" <T(dot)Pfau(at)emCrit(dot)com>,"Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug #613: Sequence values fall back to previously chec
Date: 2002-03-15 15:44:35
Message-ID: 20020315094435.A22938@zaeon.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On Fri, 15 Mar 2002, Tom Lane wrote:

> "'Ben Grimm'" <bgrimm(at)zaeon(dot)com> writes:
> > When these bugs are fixed there is still the issue of bug #3 that I 
> > came across.  The one that I work around by resetting log_cnt to 0 when a 
> > backend initializes a sequence.  It's this third bug that made the other 
> > two so apparent.  Fixing them does not obviate the need to fix this one.
> 
> What's bug #3?  I don't recall a third issue.
> 

The problem I was seeing before is that when the postmaster was shutdown 
properly, log_cnt in the sequence record was saved with whatever value it 
had at the time.  So when it loaded from disk it would have a value greater 
than zero resulting in no XLogInsert until you'd exceded log_cnt calls to
nextval.  

AFAICT, your patch fixes this problem, as I can't reproduce it now.  

Thanks!

-- Ben

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-03-15 16:03:50
Subject: Re: Bug #613: Sequence values fall back to previously chec
Previous:From: Bruce MomjianDate: 2002-03-15 15:44:16
Subject: Re: [HACKERS] Bug #613: Sequence values fall back to previously

pgsql-bugs by date

Next:From: Thomas LockhartDate: 2002-03-15 15:47:32
Subject: Re: Bug #614: Incorrect parse with time function
Previous:From: Bruce MomjianDate: 2002-03-15 15:44:16
Subject: Re: [HACKERS] Bug #613: Sequence values fall back to previously

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group