diff options
author | Andres Freund | 2019-01-21 18:32:19 +0000 |
---|---|---|
committer | Andres Freund | 2019-01-21 18:51:37 +0000 |
commit | e0c4ec07284db817e1f8d9adfb3fffc952252db0 (patch) | |
tree | ad56d635b246f6d4d0d7a17b2a4ac797d7227b62 /src/backend/utils/init/postinit.c | |
parent | 111944c5ee567f1c45bf0f1ecfdec682af467aa6 (diff) |
Replace uses of heap_open et al with the corresponding table_* function.
Author: Andres Freund
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r-- | src/backend/utils/init/postinit.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 7415c4faabc..5dc1d99f78e 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -113,7 +113,7 @@ GetDatabaseTuple(const char *dbname) * built the critical shared relcache entries (i.e., we're starting up * without a shared relcache cache file). */ - relation = heap_open(DatabaseRelationId, AccessShareLock); + relation = table_open(DatabaseRelationId, AccessShareLock); scan = systable_beginscan(relation, DatabaseNameIndexId, criticalSharedRelcachesBuilt, NULL, @@ -127,7 +127,7 @@ GetDatabaseTuple(const char *dbname) /* all done */ systable_endscan(scan); - heap_close(relation, AccessShareLock); + table_close(relation, AccessShareLock); return tuple; } @@ -156,7 +156,7 @@ GetDatabaseTupleByOid(Oid dboid) * built the critical shared relcache entries (i.e., we're starting up * without a shared relcache cache file). */ - relation = heap_open(DatabaseRelationId, AccessShareLock); + relation = table_open(DatabaseRelationId, AccessShareLock); scan = systable_beginscan(relation, DatabaseOidIndexId, criticalSharedRelcachesBuilt, NULL, @@ -170,7 +170,7 @@ GetDatabaseTupleByOid(Oid dboid) /* all done */ systable_endscan(scan); - heap_close(relation, AccessShareLock); + table_close(relation, AccessShareLock); return tuple; } @@ -1158,7 +1158,7 @@ process_settings(Oid databaseid, Oid roleid) if (!IsUnderPostmaster) return; - relsetting = heap_open(DbRoleSettingRelationId, AccessShareLock); + relsetting = table_open(DbRoleSettingRelationId, AccessShareLock); /* read all the settings under the same snapshot for efficiency */ snapshot = RegisterSnapshot(GetCatalogSnapshot(DbRoleSettingRelationId)); @@ -1170,7 +1170,7 @@ process_settings(Oid databaseid, Oid roleid) ApplySetting(snapshot, InvalidOid, InvalidOid, relsetting, PGC_S_GLOBAL); UnregisterSnapshot(snapshot); - heap_close(relsetting, AccessShareLock); + table_close(relsetting, AccessShareLock); } /* @@ -1250,13 +1250,13 @@ ThereIsAtLeastOneRole(void) HeapScanDesc scan; bool result; - pg_authid_rel = heap_open(AuthIdRelationId, AccessShareLock); + pg_authid_rel = table_open(AuthIdRelationId, AccessShareLock); scan = heap_beginscan_catalog(pg_authid_rel, 0, NULL); result = (heap_getnext(scan, ForwardScanDirection) != NULL); heap_endscan(scan); - heap_close(pg_authid_rel, AccessShareLock); + table_close(pg_authid_rel, AccessShareLock); return result; } |