X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id E6B3A11F6979 for ; Mon, 17 Apr 2006 16:38:57 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.278 X-Spam-Level: X-Spam-Status: No, score=-2.278 required=5 tests=[AWL=0.321, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id bur5uAh-DFds for ; Mon, 17 Apr 2006 16:38:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 3168F11F660C for ; Mon, 17 Apr 2006 16:38:47 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 7222F56423; Mon, 17 Apr 2006 14:38:30 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Mon, 17 Apr 2006 14:38:30 -0500 Date: Mon, 17 Apr 2006 14:38:30 -0500 From: "Jim C. Nasby" To: pgsql-admin@postgresql.org Subject: DDL commands don't handle OID wrap Message-ID: <20060417193829.GN49405@pervasive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060417:pgsql-admin@postgresql.org::FCUj/ZEoCrjnGLHJ:00000000000 0000000000000000000000001lFT X-Archive-Number: 200604/148 X-Sequence-Number: 21317 Haven't seen this in previous discussions of OID wrap in the archives. The issue is that DDL statements don't make any attempt to skip past used ranges of OIDs. duplicate key violates unique constraint "pg_attrdef_oid_index" duplicate key violates unique constraint "pg_type_oid_index" etc... While part of the solution is obviously not to define tables WITH OIDS, I would argue that this is still an issue because temporary objects use OIDs. I'm wondering if anyone has run into this problem and isn't using tables with OIDs. Probably the easiest way to fix this would be to trap oid unique constraint violations on catalog tables and find the next available number to use (probably want to bump the OID counter up to that at the same time). Of course a better method would be to drop OIDs from the catalog tables completely, but given the amount of work involved in that... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461