*
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.235 2006/01/08 20:04:41 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.236 2006/01/19 00:27:08 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
                }
        }
 
-       rebuildList = list_concat(rebuildFirstList, rebuildList);
-
        /*
         * Now zap any remaining smgr cache entries.  This must happen before we
         * start to rebuild entries, since that may involve catalog fetches which
        smgrcloseall();
 
        /* Phase 2: rebuild the items found to need rebuild in phase 1 */
+       foreach(l, rebuildFirstList)
+       {
+               relation = (Relation) lfirst(l);
+               RelationClearRelation(relation, true);
+       }
+       list_free(rebuildFirstList);
        foreach(l, rebuildList)
        {
                relation = (Relation) lfirst(l);