Re: OID wraparound (was Re: pg_depend)

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: OID wraparound (was Re: pg_depend)
Date: 2001-07-19 01:06:50
Message-ID: 20010719100650L.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: OID wraparound (was Re: [HACKERS] pg_depend)
Date: Wed, 18 Jul 2001 13:52:45 -0400
Message-ID: <6335(dot)995478765(at)sss(dot)pgh(dot)pa(dot)us>

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Yikes, I am not sure we are ready to make oids optional.
>
> We've discussed it enough, it's time to do it. I have an ulterior plan
> here: I want 7.2 not to have any limitations that prevent it from being
> used in a true 24x7, up-forever scenario. VACUUM lockouts are fixed
> now, or nearly.

What about pg_log? It will easily become a huge file. Currently the
only solution is re-installing whole database, that is apparently
unacceptable for very big installation like 1TB.

> The other stumbling blocks for continuous runs are OID
> wraparound and XID wraparound. We've got unique indexes on OIDs for all
> system catalogs that need them (we were short a couple as of 7.1, btw),
> but OID wrap is still likely to lead to unwanted "duplicate key"
> failures. So we still need a way to reduce the system's appetite for
> OIDs. In a configuration where OIDs are used only where *necessary*,
> it'd be a long time till wrap. I also intend to do something about XID
> wrap next month...

So are we going to remove OID? I see following in the SQL99 draft (not
sure it actually becomes a part of the SQL99 standard, though). Can we
implement the "Object identifier" without the current oid mechanism?

---------------------------------------------------------------------
4.10 Object identifier

An object identifier OID is a value generated when an object is
created, to give that object an immutable identity. It is unique in
the known universe of objects that are instances of abstract data
types, and is conceptually separate from the value, or state, of
the instance.

The object identifier type is described by an object identifier
type descriptor. An object identifier type descriptor contains:

- an indication that this is an object identifier type; and

- the name of the abstract data type within which the object
identifier type is used.

The object identifier type is only used to define the OID pseudo-
column implicitly defined in object ADTs within an ADT definition.

___________________________________________________________________

An OID literal exists for an object identifier type only if the
associated abstract data type was defined WITH OID VISIBLE. The OID
value is materialized as a character string with an implementation-
defined length and character set SQL_TEXT.

---------------------------------------------------------------------

>> Will we have cheap 64-bit oids by the time oid wraparound becomes an
>> issue?
>
>No, we won't, because OID wrap is an issue already for any long-uptime
>installation. (64-bit XIDs are not a real practical answer either,
>btw.)

What's wrong with 64-bit oids (except extra 4bytes)?
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-07-19 01:11:57 Visit to Red Hat Canada
Previous Message Bruce Momjian 2001-07-19 00:59:00 Re: OID wraparound (was Re: pg_depend)