X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 078D7D7C23 for ; Mon, 17 Oct 2005 16:50:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91176-07 for ; Mon, 17 Oct 2005 19:49:58 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 9E697D7BDD for ; Mon, 17 Oct 2005 16:49:59 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 17 Oct 2005 14:50:01 -0500 Subject: Re: Solving OID wrap-around in 7.4 DB? From: Scott Marlowe To: Chris Browne Cc: pgsql-admin@postgresql.org In-Reply-To: <60fyr0gjlw.fsf@dba2.int.libertyrms.com> References: <43523940.6080403@endpoint.com> <60fyr0gjlw.fsf@dba2.int.libertyrms.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1129578600.32035.5.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 17 Oct 2005 14:50:01 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 required=5 tests=[AWL=0.007] X-Spam-Level: X-Archive-Number: 200510/194 X-Sequence-Number: 19266 On Mon, 2005-10-17 at 12:04, Chris Browne wrote: > jeff@endpoint.com (Jeff Boes) writes: > > On behalf of a previous employer who, due to major downsizing, is left > > without an answer to this: > > > > What's the best way to treat impending OID wrap-around in a 7.4.8 > > database? This DB has been online for about 18 months, and is expected > > to hit the dreaded wrap-around in about a month. At an application > > level, there's some small chance that OID wrap will cause failures: > > there's code that writes rows, and (for tables without primary keys) > > relies on DBD::Pg's pg_oid_status method to identify the last INSERT. > > (The vast majority of the code does not rely on this, but there's a tiny > > fraction that does, and rewriting the code to remove this is not an > > option due to the aforementioned downsizing.) > > > > My immediate take on this is that the only sure way to avoid the > > problem would be to dump and reload the database. Due to the size of > > the database, this is likely to take most of a day. Any other > > options? > > Another method would be to use replication to load the data into a > fresh DB instance. > > You could, in principle, use Slony-I to do this; that is an intended > sort of "use case." I thought that with 7.4 all you needed was to vacuum all databases (full maybe???) to prevent oid wraparound.