Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 73F7F632311 for ; Wed, 7 Jul 2010 16:59:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 48455-05 for ; Wed, 7 Jul 2010 19:59:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.jfcomputer.com (unknown [76.14.161.106]) by mail.postgresql.org (Postfix) with ESMTP id E01D7632D49 for ; Wed, 7 Jul 2010 16:59:08 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.jfcomputer.com (Postfix) with ESMTP id CFC0879673 for ; Wed, 7 Jul 2010 12:59:05 -0700 (PDT) X-Virus-Scanned: amavisd-new at jfcomputer.com Received: from mail.jfcomputer.com ([127.0.0.1]) by localhost (server1.jfcomputer.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fnZTJKFgfKdH for ; Wed, 7 Jul 2010 12:59:03 -0700 (PDT) Received: from [192.168.1.219] (unknown [192.168.1.219]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johnf@mail.jfcomputer.com) by mail.jfcomputer.com (Postfix) with ESMTPSA id A3B5379648 for ; Wed, 7 Jul 2010 12:59:03 -0700 (PDT) From: John To: pgsql-sql@postgresql.org Subject: strangest thing happened Date: Wed, 7 Jul 2010 12:59:03 -0700 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201007071259.03294.johnf@jfcomputer.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.593 tagged_above=-5 required=5 tests=BAYES_50=0.8, RDNS_NONE=0.793 X-Spam-Level: * X-Archive-Number: 201007/29 X-Sequence-Number: 34342 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. 2. Does anyone have a script to reset the sequences to match the tables? Thanks in advance, Johnf