From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au> |
Cc: | Paul Caskey <paul(at)nmxs(dot)com>, Postgres Users <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: 4 billion record limit? |
Date: | 2000-07-25 05:44:37 |
Message-ID: | 4007.964503877@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au> writes:
> Paul Caskey wrote:
>> 1. This implies a hard limit of 4 billion records on a server, right?
> Basically, yes.
It's only a hard limit if your application assumes OIDs are unique.
If you don't assume that, then I think it's not a big problem.
It's possible (though obviously not especially likely) that you might
get OID collisions in the system tables after an OID-counter wraparound.
I believe that in 7.0, any such collision will result in a "duplicate
key" error, because we have unique indexes on OID for all the system
tables where it matters. So worst case is you'd have to retry a table
creation or whatever the command was. This could be annoying but it's
certainly not catastrophic.
> The real solution is to support 64 bit oids, but that has not been done
> yet.
64-bit OIDs are probably the Final Solution here, but we're not in a
big hurry to do that because of the space cost and portability issues.
Another idea that's been discussed is to make OID column optional in
user tables --- then, simply not using OIDs in your large tables would
be enough to make the 32-bit OID supply last indefinitely.
As long as we're talking about outer limits, it might be worth pointing
out that block numbers within tables are 32 bits. With the default
blocksize of 8K, that sets a hard limit of either 16Tb or 32Tb per
table, depending on whether block-number arithmetic is unsigned or not
(I'm not sure). You could push that to 64/128Tb by using BLCKSZ=32K.
If that won't do, maybe you need a different DBMS ;-)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2000-07-25 05:44:52 | Re: Only updating part of a column |
Previous Message | Ian Turner | 2000-07-25 05:37:10 | function language type? |
From | Date | Subject | |
---|---|---|---|
Next Message | Jerome Raupach | 2000-07-25 16:03:29 | posgresql and C++ |
Previous Message | Thomas SMETS | 2000-07-25 02:02:36 | [Fwd: inserting integer in Table] |