Re: Assigning fixed OIDs to system catalogs and indexes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Assigning fixed OIDs to system catalogs and indexes
Date
Msg-id 2146.1113359283@sss.pgh.pa.us
Whole thread Raw
In response to Re: Assigning fixed OIDs to system catalogs and indexes  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.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
wayto update pg_class rows    * in other databases), nor for nailed-in-cache relations (the    * relfilenode values for
thoseare 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Assigning fixed OIDs to system catalogs and indexes
Next
From: Alvaro Herrera
Date:
Subject: Re: ISO-8859-1 encoding not enforced?