X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4DC5D1B184 for ; Wed, 30 Jun 2004 23:45:18 -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 25705-10 for ; Thu, 1 Jul 2004 02:45:14 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A7419D1B2A6 for ; Wed, 30 Jun 2004 23:45:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i612jAGx020193; Wed, 30 Jun 2004 22:45:10 -0400 (EDT) To: "nwalker@eldocomp.com" Cc: "pgsql-admin@postgresql.org" Subject: Re: Sequence Number question In-reply-to: <40DC6E77.1070908@eldocomp.com> References: <40DC6E77.1070908@eldocomp.com> Comments: In-reply-to Naomi Walker message dated "Fri, 25 Jun 2004 11:27:03 -0700" Date: Wed, 30 Jun 2004 22:45:10 -0400 Message-ID: <20192.1088649910@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=TO_ADDRESS_EQ_REAL X-Spam-Level: X-Archive-Number: 200406/408 X-Sequence-Number: 14068 Naomi Walker writes: > We are using Postgres 7.3.2 on a Solaris box. > When I dump a schema with a SEQUENCE in it, it shows the MAXVAL as > 2,147,483,647. > Is it possible to set this number higher? Hmm ... 7.3 does have support for 64-bit sequences, if it was compiled on a compiler that has a 64-bit integer type. If you just do create sequence s; select * from s; what do you see for max_value? If it's 2147483647, then you need to get a better compiler and rebuild Postgres. If it's 9223372036854775807 then you're good, and what you probably have is a sequence that was dumped and reloaded from an older version of Postgres that didn't have 64-bit sequence support. I don't think 7.3 has ALTER SEQUENCE, but you could drop and recreate the sequence and then manually fix its current value. > When we get to maxval, does it wrap? Not unless you said CYCLE. Read the CREATE SEQUENCE man page. regards, tom lane