Re: Bug with sequences and WAL ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philippe Ferreira <phil(dot)f(at)worldonline(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bug with sequences and WAL ?
Date: 2006-02-04 02:38:13
Message-ID: 15339.1139020693@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Philippe Ferreira <phil(dot)f(at)worldonline(dot)fr> writes:
> If a new sequence is created, its creation is propagated via WAL.

> However, instead of getting the property 'is_called'=false (the correct
> value before its first use),
> we get 'is_called'=true after a PITR recovery.

> Is it a bug, or a normal behaviour ?

I don't think this is very important, because the normal behavior of
sequences is that after a crash the sequence can be up to 32 (IIRC)
counts beyond the last value actually delivered before the crash.
To get "exact" restart behavior we'd need to emit a separate xlog
record for each nextval() command, which seems like a pretty high
price considering that you cannot assume no holes in the sequence
values anyway.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tyler MacDonald 2006-02-04 03:32:25 Should I use PL/PGSQL or Perl/PGSQL?
Previous Message Bruce Momjian 2006-02-04 02:01:27 Re: Error with temporary tables