"Qingqing Zhou" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to