From: Tom Lane <tgl@sss.pgh.pa.us>
To: nwalker@eldocomp.com <nwalker@eldocomp.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Sequence Number question
Date: Wed, 30 Jun 2004 22:45:10 -0400
Message-ID: <20192.1088649910@sss.pgh.pa.us> (raw)
In-Reply-To: <40DC6E77.1070908@eldocomp.com>
References: <40DC6E77.1070908@eldocomp.com>
Naomi Walker <nwalke@eldocomp.com> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, nwalker@eldocomp.com
Subject: Re: Sequence Number question
In-Reply-To: <20192.1088649910@sss.pgh.pa.us>
References: <40DC6E77.1070908@eldocomp.com> <20192.1088649910@sss.pgh.pa.us>
* 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