diff options
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r-- | src/backend/commands/cluster.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index dc450f1eaf..0858a3c567 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -20,7 +20,6 @@ #include "access/genam.h" #include "access/heapam.h" #include "catalog/catalog.h" -#include "catalog/catname.h" #include "catalog/dependency.h" #include "catalog/heap.h" #include "catalog/index.h" @@ -434,7 +433,7 @@ mark_index_clustered(Relation rel, Oid indexOid) /* * Check each index of the relation and set/clear the bit as needed. */ - pg_index = heap_openr(IndexRelationName, RowExclusiveLock); + pg_index = heap_open(IndexRelationId, RowExclusiveLock); foreach(index, RelationGetIndexList(rel)) { @@ -719,7 +718,7 @@ swap_relation_files(Oid r1, Oid r2) CatalogIndexState indstate; /* We need writable copies of both pg_class tuples. */ - relRelation = heap_openr(RelationRelationName, RowExclusiveLock); + relRelation = heap_open(RelationRelationId, RowExclusiveLock); reltup1 = SearchSysCacheCopy(RELOID, ObjectIdGetDatum(r1), @@ -883,7 +882,7 @@ get_tables_to_cluster(MemoryContext cluster_context) * ever have indisclustered set, because CLUSTER will refuse to set it * when called with one of them as argument. */ - indRelation = relation_openr(IndexRelationName, AccessShareLock); + indRelation = heap_open(IndexRelationId, AccessShareLock); ScanKeyInit(&entry, Anum_pg_index_indisclustered, BTEqualStrategyNumber, F_BOOLEQ, |