Re: OID Overflow for large objects

From: Jeff Boes <jboes(at)nexcerpt(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: OID Overflow for large objects
Date: 2004-05-11 15:11:14
Message-ID: 40A0ED12.70101@nexcerpt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom Lane wrote:

>>(http://www3.sk.postgresql.org/docs/faqs/FAQ.html)
>>
>>
>>OIDs are stored as 4-byte integers, and will overflow at 4 billion. No
>>one has reported this ever happening, and we plan to have the limit
>>removed before anyone does.
>>
>>
>
>That comment in the FAQ seems quite out-of-date.
>
>What will actually happen is that the OID generator will wrap around.
>This will not bother Postgres particularly, but you may start having
>occasional transaction failures due to duplicate OIDs --- for example,
>I believe lo_create will fail if the OID it selects already exists in
>pg_largeobject.
>
>
>

Pardon my incredulity, but doesn't that seem like a bug? Or at least a
limitation? Does this mean that the effective useful lifetime of
pg_largeobject is only as long as it takes to wrap around, after which
you *must* dump and reload to prevent problems like this?

(I realize this is pretty much the same issue as having a sequence
number on a table, but if I'm interpreting all this correctly, the OID
wrap-around is going to occur a lot sooner than my table sequence number
wrap-around.)

--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Graham Clarke 2004-05-11 17:21:26 could not bind socket for statistics collector
Previous Message Tom Lane 2004-05-11 15:10:30 Re: could not bind socket for statistics collector