Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7ECD4633514 for ; Mon, 3 May 2010 08:26:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 03233-01 for ; Mon, 3 May 2010 11:26:42 +0000 (UTC) X-Greylist: delayed 00:10:04.759969 by SQLgrey-1.7.6 Received: from mail.scanlab.de (mail.scanlab.de [62.138.55.241]) by mail.postgresql.org (Postfix) with ESMTP id D2A27632FCC for ; Mon, 3 May 2010 08:26:40 -0300 (ADT) Received: from unknown (HELO Exchange-Server.scanlab-intern.de) ([172.16.20.15]) by mail.scanlab-intern.de with ESMTP; 03 May 2010 13:16:32 +0200 Received: from Exchange-Server.scanlab-intern.de ([127.0.0.1]) by Exchange-Server ([127.0.0.1]) with mapi; Mon, 3 May 2010 13:16:31 +0200 From: Andreas Gaab To: pgsql-sql mailing list CC: =?iso-8859-1?Q?Hans_Joachim_M=FCnzer?= Date: Mon, 3 May 2010 13:16:31 +0200 Subject: WAL-files restore and nextval('PK') Thread-Topic: WAL-files restore and nextval('PK') Thread-Index: AcrqshVquzb06AbzR5SWSzsvZm/pmg== Message-ID: <48DA836F3865C54B8FBF424A3B775AF6010D455863@Exchange-Server> Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE Content-Type: multipart/alternative; boundary="_000_48DA836F3865C54B8FBF424A3B775AF6010D455863ExchangeServe_" MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.791 tagged_above=-5 required=5 tests=BAYES_50=0.8, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/6 X-Sequence-Number: 34054 --_000_48DA836F3865C54B8FBF424A3B775AF6010D455863ExchangeServe_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear all, after an WAL-restore of our Postgres DB, we observe seemingly wrong values = of our sequences. We have two postgres server (8.4) with pgpool in replication mode. Recently we tested our restore procedure and played our WAL-files into the = second server after an old file-system backup was restored. Accidently, we aborted the starting server and had to restart it and theref= ore started WAL-replay again. Now we observe, that the newly restored server has higher values in his seq= uences as the other server. Could it be that during restart of the WAL-file restore SELECT nextval('PK'= ) ; commands were executed again, whereas the data rows were already restor= ed and thus leading to higher sequence numbers on the newly restored server= ? Best regards for any comments! Andreas ___________________________________________________________________________ SCANLAB AG Dr. Andreas Simon Gaab Entwicklung * R & D Siemensstr. 2a * 82178 Puchheim * Germany Tel. +49 (89) 800 746-513 * Fax +49 (89) 800 746-199 mailto:a.gaab@scanlab.de * www.scanlab.de Amtsgericht M=FCnchen: HRB 124707 * USt-IdNr.: DE 129 456 351 Vorstand: Georg Hofner (Sprecher), Christian Huttenloher, Norbert Petschik Aufsichtsrat (Vorsitz): Dr. Hans J. Langer ___________________________________________________________________________ --_000_48DA836F3865C54B8FBF424A3B775AF6010D455863ExchangeServe_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Dear all,

 

after an WAL-restore of our Postgres DB, we observe seemingly wrong values of our sequences.

 

We have two postgres server (8.4) with pgpool in replication mode. =

 

Recently we tested our restore procedure and played our WAL-files into the second se= rver after an old file-system backup was restored.

Accidently, we aborted the starting server and had to restart it and therefore started = WAL-replay again.

 

Now we observe, that the newly restored server has higher values in his sequenc= es as the other server.

 

Could it be that during restart of the WAL-file restore SELECT nextval(‘PK&= #8217;) ; commands were executed again, whereas the data rows were already restored= and thus leading to higher sequence numbers on the newly restored server?<= /o:p>

 

Best regards for any comments!

 

Andreas

 

 

_____________________= ______________________________________________________

 

SCANLAB AG<= /o:p>

Dr. Andreas = ;Simon Gaab

Entwicklung • R & D

 

Siemensstr. 2a &= #8226; 82178 Puchheim • Germany

Tel. +49 (8= 9) 800 746-513 • Fax +49 (89) 800 746-199

mailto:a.gaab@scanlab.de • www.scanlab.de

 

Amtsgericht M=FC= nchen: HRB 124707 • USt-IdNr.: DE 129 456 351=

Vorstand: Georg Hofner (Sprecher), Christian Huttenloher, Norbert Petschik

Aufsichtsrat (Vo= rsitz): Dr. Hans J. Langer

_____________________= ______________________________________________________

 

--_000_48DA836F3865C54B8FBF424A3B775AF6010D455863ExchangeServe_--