pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Torsten Zühlsdorff <foo@meisterderspiele.de>
To: pgsql-sql@postgresql.org
Subject: Re: strangest thing happened
Date: Thu, 08 Jul 2010 16:57:28 +0200
Message-ID: <i14p0p$ure$1@news.eternal-september.org> (raw)
In-Reply-To: <4C34E764.3040703@joeconway.com>
References: <201007071259.03294.johnf@jfcomputer.com>
	<4C34E764.3040703@joeconway.com>

Joe Conway schrieb:

>> I am the only developer, DBA etc.. for a small project.  Today (yesterday was 
>> everything was perfect) many of the sequence numbers fell behind what is the 
>> actual PK value.   For example the invoice PK sequence current value = 1056 
>> but the table PK was 1071.  Nobody (other than myself) knows how to 
>> edit/access the postgres server.  So
>>
>> 1. Does anyone know how this could have happened?????? Other than human 
>> interaction.
> 
> I've never heard of this happening. Are you certain nothing bypassed the
> sequence and directly inserted a PK value?

Maybe the sequence is defined with "cycle" and starts again? Very 
unlikly, but a possibility.

Otherwise i would expect an bad backup/restore, direct insert of serials 
or manipulated them afterwards (by insert, update or an function).

Gretings from Germany,
Torsten

-- 
http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8 
verschiedenen Datenbanksystemen abstrahiert,
Queries von Applikationen trennt und automatisch die Query-Ergebnisse 
auswerten kann.



view thread (11+ messages)

Message-ID: <i14p0p$ure$1@news.eternal-september.org>
Permalink:  ../i14p0p$ure$1@news.eternal-september.org/
Also on:    postgresql.org/message-id/i14p0p$ure$1@news.eternal-september.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: foo@meisterderspiele.de
  Subject: Re: strangest thing happened
  In-Reply-To: <i14p0p$ure$1@news.eternal-september.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