Re: Assigning fixed OIDs to system catalogs and indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Assigning fixed OIDs to system catalogs and indexes
Date: 2005-04-13 02:28:03
Message-ID: 2146.1113359283@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> template1=# cluster pg_attribute_relid_attnam_index on pg_attribute;
> ERROR: "pg_attribute" is a system catalog

That error has nothing to do with any risk of reassigning OIDs. The
issue is whether we can change the index's relfilenode or not --- the
error is actually coming from here:

/*
* Disallow clustering system relations. This will definitely NOT
* work for shared relations (we have no way to update pg_class rows
* in other databases), nor for nailed-in-cache relations (the
* relfilenode values for those are hardwired, see relcache.c). It
* might work for other system relations, but I ain't gonna risk it.
*/
if (IsSystemRelation(OldHeap))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("\"%s\" is a system catalog",
RelationGetRelationName(OldHeap))));

AFAIK it would work for cases not explained in the comment, but it's
not been tested.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-04-13 03:03:17 Re: ISO-8859-1 encoding not enforced?
Previous Message Tom Lane 2005-04-13 02:13:25 Re: Assigning fixed OIDs to system catalogs and indexes