Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Sequences -...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 3074 of 3255
Post > Topic >>

Re: Sequences - jumped after power failure

by tgl@[EMAIL PROTECTED] (Tom Lane) Apr 15, 2008 at 10:58 AM

Steve T <steve@[EMAIL PROTECTED]
> writes:
> I have a set of claims tables that cover the claim itself, the customer,
> contact points etc. Yesterday there was a power failure and the server
> suffered an immediate power outage. When the server came back,
> everything seemed fine, apart from the fact that the claim related
> sequences had all jumped and left a gap of 33 (last was 52 before power
> failure, next one allocated after power failure 85). This seems
> consistent across all the tables related to the claim (it may be across
> the   tables in the database - I haven't checked all of them as yet).

> Does this sound feasible and if so, what is the cause?

Yeah, this is intentional behavior designed to reduce the amount of disk
write traffic generated by nextval()s.  From a standing start, a
nextval() actually advances the sequence 33 times (1 + SEQ_LOG_VALS),
so that the next 32 nextval()s won't need to generate their own WAL
records.  I guess you must have crashed before that first nextval()
was able to commit its result into the database ...

			regards, tom lane

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 7 Posts in Topic:
Sequences - jumped after power failure
steve@[EMAIL PROTECTED]   2008-04-15 09:21:05 
Re: Sequences - jumped after power failure
sdavis2@[EMAIL PROTECTED]  2008-04-15 05:47:33 
Re: Sequences - jumped after power failure
steve@[EMAIL PROTECTED]   2008-04-15 11:07:18 
Re: Sequences - jumped after power failure
nobs@[EMAIL PROTECTED] (  2008-04-15 12:50:49 
Re: Sequences - jumped after power failure
tgl@[EMAIL PROTECTED] (T  2008-04-15 10:58:17 
Re: Sequences - jumped after power failure
steve@[EMAIL PROTECTED]   2008-04-15 16:51:51 
Re: Sequences - jumped after power failure
steve@[EMAIL PROTECTED]   2008-04-15 18:04:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 2:25:50 CDT 2008.