pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Andreas Gaab <A.Gaab@scanlab.de>
Cc: pgsql-sql mailing list <pgsql-sql@postgresql.org>
Cc: Hans Joachim Münzer <H.Muenzer@scanlab.de>
Subject: Re: WAL-files restore and nextval('PK')
Date: Mon, 3 May 2010 11:28:47 -0400
Message-ID: <20100503152847.GC2986@alvh.no-ip.org> (raw)
In-Reply-To: <48DA836F3865C54B8FBF424A3B775AF6010D455863@Exchange-Server>
References: <48DA836F3865C54B8FBF424A3B775AF6010D455863@Exchange-Server>

Andreas Gaab wrote:
> Dear all,
> 
> after an WAL-restore of our Postgres DB, we observe seemingly wrong values of our sequences.

This is normal.  The reason is that sequences are WAL-logged in chunks,
not single values (otherwise they'd be too slow).  So after recovery,
the values jump to the logged values, which are necessarily higher than
the values they last delivered before the crash.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



view thread (3+ messages)

Message-ID: <20100503152847.GC2986@alvh.no-ip.org>
Permalink:  ../20100503152847.GC2986@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20100503152847.GC2986@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: alvherre@commandprompt.com, A.Gaab@scanlab.de, H.Muenzer@scanlab.de
  Subject: Re: WAL-files restore and nextval('PK')
  In-Reply-To: <20100503152847.GC2986@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox