Re: Re: 4 billion record limit?

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: 4 billion record limit?
Date: 2000-07-28 17:06:55
Message-ID: 20000728120655.A4538@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Fri, Jul 28, 2000 at 11:48:10AM -0500, Keith G. Murphy wrote:
> Mitch Vincent wrote:
> >
> > There is something else that many aren't considering. In every application
> > I've ever written to use any database I use ID numbers of my own making,
> > always they're integer. 4 billion is the limit on any integer field, not
> > just the OID so there are limitations everyone should realize when using any
> > integer for any kind of record identification purposes..
> >
> That's an excellent point, especially considering that *sequences* use
> an integer to hold their max_value, which is by default 2,147,483,647.
> You cannot go larger than that, either. I guess it's constrained to be
> positive. So OIDs give you more potential unique values than sequences,
> far as I can tell.

However, in each case, you've got a per table (per field, really) limit,
not a per database. Not to mention that there are work arounds: two int
fields form a nice 64 bit compund key, without any need for a 64 bit
int custom type. Admittedly cumbersome to use, but standard SQL. The
sequence is a bit more or a problem, but since it's non standard SQL
anyway, writing your own sequence that uses a numeric counter gives you
potentially infinite serials.

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-07-28 17:36:35 Re: pg_dump & performance degradation
Previous Message Paul Caskey 2000-07-28 17:06:26 Re: 4 billion record limit?

Browse pgsql-novice by date

  From Date Subject
Next Message ERIC Lawson - x52010 2000-07-28 19:09:09 Functional dysfunction
Previous Message Paul Caskey 2000-07-28 17:06:26 Re: 4 billion record limit?