From: Tom Lane <tgl@sss.pgh.pa.us>
To: Will LaShell <will@lashell.net>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Using oid with RServ w/ Postgresql 7.2
Date: Mon, 21 Oct 2002 13:26:56 -0400
Message-ID: <25531.1035221216@sss.pgh.pa.us> (raw)
In-Reply-To: <1035220045.10930.25.camel@lyric.ofsloans.com>
References: <1034888522.3498.3.camel@lyric.ofsloans.com>
<13546.1034906114@sss.pgh.pa.us>
<1035220045.10930.25.camel@lyric.ofsloans.com>
Will LaShell <will@lashell.net> writes:
> On Thu, 2002-10-17 at 18:55, Tom Lane wrote:
>> This is risky for a long-lived database. Things will work fine until
>> the OID counter wraps around (ie, more than 4 billion rows inserted
>> into your database). After that you have a risk of OID collisions.
>>
>> You can prevent the worst problems by installing a unique index on OID
>> on each replicated table; but then you may occasionally get unexpected
>> "duplicate key" errors.
> Just out of curiousity, when OID wraparound happens, won't there be
> bigger problems?
No, occasional "duplicate key" errors are about what you'd have to deal
with, assuming you have unique indexes on OID on every table where OID
matters to you.
You might also have some problems with pg_dump dumping things in a funny
order, because it relies on OID comparisons to try to guess the creation
order of objects. We have plans to fix that in the future (maybe for
7.4), but for now it'd mean you'd need to manually edit the dump file
to fix the dump order. (Or use the custom dump format and make use of
pg_restore's ability to restore things in a specified order.)
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, will@lashell.net
Subject: Re: Using oid with RServ w/ Postgresql 7.2
In-Reply-To: <25531.1035221216@sss.pgh.pa.us>
References: <1034888522.3498.3.camel@lyric.ofsloans.com> <13546.1034906114@sss.pgh.pa.us> <1035220045.10930.25.camel@lyric.ofsloans.com> <25531.1035221216@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