diff options
author | Tom Lane | 2017-02-01 21:13:30 +0000 |
---|---|---|
committer | Tom Lane | 2017-02-01 21:13:30 +0000 |
commit | ab02896510e26e46b830c87eef2c03dd3c52c09e (patch) | |
tree | 7fa1029a989330f411bae9b018f1350ccefc90ac /src/backend/commands | |
parent | bbd8550bce146f86e5e883f1232292a975c314fb (diff) |
Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().
This extends the work done in commit 2f5c9d9c9 to provide a more nearly
complete abstraction layer hiding the details of index updating for catalog
changes. That commit only invented abstractions for catalog inserts and
updates, leaving nearby code for catalog deletes still calling the
heap-level routines directly. That seems rather ugly from here, and it
does little to help if we ever want to shift to a storage system in which
indexing work is needed at delete time.
Hence, create a wrapper function CatalogTupleDelete(), and replace calls
of simple_heap_delete() on catalog tuples with it. There are now very
few direct calls of [simple_]heap_delete remaining in the tree.
Discussion: https://postgr.es/m/462.1485902736@sss.pgh.pa.us
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/amcmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/comment.c | 8 | ||||
-rw-r--r-- | src/backend/commands/dbcommands.c | 2 | ||||
-rw-r--r-- | src/backend/commands/event_trigger.c | 2 | ||||
-rw-r--r-- | src/backend/commands/extension.c | 2 | ||||
-rw-r--r-- | src/backend/commands/foreigncmds.c | 6 | ||||
-rw-r--r-- | src/backend/commands/functioncmds.c | 8 | ||||
-rw-r--r-- | src/backend/commands/opclasscmds.c | 8 | ||||
-rw-r--r-- | src/backend/commands/operatorcmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/policy.c | 2 | ||||
-rw-r--r-- | src/backend/commands/proclang.c | 2 | ||||
-rw-r--r-- | src/backend/commands/publicationcmds.c | 5 | ||||
-rw-r--r-- | src/backend/commands/schemacmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/seclabel.c | 8 | ||||
-rw-r--r-- | src/backend/commands/sequence.c | 2 | ||||
-rw-r--r-- | src/backend/commands/subscriptioncmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 6 | ||||
-rw-r--r-- | src/backend/commands/tablespace.c | 2 | ||||
-rw-r--r-- | src/backend/commands/trigger.c | 2 | ||||
-rw-r--r-- | src/backend/commands/tsearchcmds.c | 14 | ||||
-rw-r--r-- | src/backend/commands/typecmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/user.c | 8 |
22 files changed, 48 insertions, 49 deletions
diff --git a/src/backend/commands/amcmds.c b/src/backend/commands/amcmds.c index b6e60469f39..225e6f636ca 100644 --- a/src/backend/commands/amcmds.c +++ b/src/backend/commands/amcmds.c @@ -128,7 +128,7 @@ RemoveAccessMethodById(Oid amOid) if (!HeapTupleIsValid(tup)) elog(ERROR, "cache lookup failed for access method %u", amOid); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index 8a437de8154..87ca62f2403 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -194,7 +194,7 @@ CreateComments(Oid oid, Oid classoid, int32 subid, char *comment) /* Found the old tuple, so delete or update it */ if (comment == NULL) - simple_heap_delete(description, &oldtuple->t_self); + CatalogTupleDelete(description, &oldtuple->t_self); else { newtuple = heap_modify_tuple(oldtuple, RelationGetDescr(description), values, @@ -284,7 +284,7 @@ CreateSharedComments(Oid oid, Oid classoid, char *comment) /* Found the old tuple, so delete or update it */ if (comment == NULL) - simple_heap_delete(shdescription, &oldtuple->t_self); + CatalogTupleDelete(shdescription, &oldtuple->t_self); else { newtuple = heap_modify_tuple(oldtuple, RelationGetDescr(shdescription), @@ -358,7 +358,7 @@ DeleteComments(Oid oid, Oid classoid, int32 subid) NULL, nkeys, skey); while ((oldtuple = systable_getnext(sd)) != NULL) - simple_heap_delete(description, &oldtuple->t_self); + CatalogTupleDelete(description, &oldtuple->t_self); /* Done */ @@ -394,7 +394,7 @@ DeleteSharedComments(Oid oid, Oid classoid) NULL, 2, skey); while ((oldtuple = systable_getnext(sd)) != NULL) - simple_heap_delete(shdescription, &oldtuple->t_self); + CatalogTupleDelete(shdescription, &oldtuple->t_self); /* Done */ diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index c3eb3c79df4..30000a1eeb8 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -895,7 +895,7 @@ dropdb(const char *dbname, bool missing_ok) if (!HeapTupleIsValid(tup)) elog(ERROR, "cache lookup failed for database %u", db_id); - simple_heap_delete(pgdbrel, &tup->t_self); + CatalogTupleDelete(pgdbrel, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 94c4ea5dd21..346b347ae17 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -484,7 +484,7 @@ RemoveEventTriggerById(Oid trigOid) if (!HeapTupleIsValid(tup)) elog(ERROR, "cache lookup failed for event trigger %u", trigOid); - simple_heap_delete(tgrel, &tup->t_self); + CatalogTupleDelete(tgrel, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 14738ea584c..325f5b74b81 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -1854,7 +1854,7 @@ RemoveExtensionById(Oid extId) /* We assume that there can be at most one matching tuple */ if (HeapTupleIsValid(tuple)) - simple_heap_delete(rel, &tuple->t_self); + CatalogTupleDelete(rel, &tuple->t_self); systable_endscan(scandesc); diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c index ad8ca2d8eba..d5d40e62392 100644 --- a/src/backend/commands/foreigncmds.c +++ b/src/backend/commands/foreigncmds.c @@ -846,7 +846,7 @@ RemoveForeignDataWrapperById(Oid fdwId) if (!HeapTupleIsValid(tp)) elog(ERROR, "cache lookup failed for foreign-data wrapper %u", fdwId); - simple_heap_delete(rel, &tp->t_self); + CatalogTupleDelete(rel, &tp->t_self); ReleaseSysCache(tp); @@ -1080,7 +1080,7 @@ RemoveForeignServerById(Oid srvId) if (!HeapTupleIsValid(tp)) elog(ERROR, "cache lookup failed for foreign server %u", srvId); - simple_heap_delete(rel, &tp->t_self); + CatalogTupleDelete(rel, &tp->t_self); ReleaseSysCache(tp); @@ -1403,7 +1403,7 @@ RemoveUserMappingById(Oid umId) if (!HeapTupleIsValid(tp)) elog(ERROR, "cache lookup failed for user mapping %u", umId); - simple_heap_delete(rel, &tp->t_self); + CatalogTupleDelete(rel, &tp->t_self); ReleaseSysCache(tp); diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index f4fa8d35a4e..dd83858b3dd 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -1131,7 +1131,7 @@ RemoveFunctionById(Oid funcOid) isagg = ((Form_pg_proc) GETSTRUCT(tup))->proisagg; - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); @@ -1148,7 +1148,7 @@ RemoveFunctionById(Oid funcOid) if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for pg_aggregate tuple for function %u", funcOid); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); @@ -1735,7 +1735,7 @@ DropCastById(Oid castOid) tuple = systable_getnext(scan); if (!HeapTupleIsValid(tuple)) elog(ERROR, "could not find tuple for cast %u", castOid); - simple_heap_delete(relation, &tuple->t_self); + CatalogTupleDelete(relation, &tuple->t_self); systable_endscan(scan); heap_close(relation, RowExclusiveLock); @@ -2021,7 +2021,7 @@ DropTransformById(Oid transformOid) tuple = systable_getnext(scan); if (!HeapTupleIsValid(tuple)) elog(ERROR, "could not find tuple for transform %u", transformOid); - simple_heap_delete(relation, &tuple->t_self); + CatalogTupleDelete(relation, &tuple->t_self); systable_endscan(scan); heap_close(relation, RowExclusiveLock); diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 99a39bdd742..5f2364bccf6 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -1571,7 +1571,7 @@ RemoveOpFamilyById(Oid opfamilyOid) if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for opfamily %u", opfamilyOid); - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); ReleaseSysCache(tup); @@ -1590,7 +1590,7 @@ RemoveOpClassById(Oid opclassOid) if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for opclass %u", opclassOid); - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); ReleaseSysCache(tup); @@ -1620,7 +1620,7 @@ RemoveAmOpEntryById(Oid entryOid) if (!HeapTupleIsValid(tup)) elog(ERROR, "could not find tuple for amop entry %u", entryOid); - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); systable_endscan(scan); heap_close(rel, RowExclusiveLock); @@ -1649,7 +1649,7 @@ RemoveAmProcEntryById(Oid entryOid) if (!HeapTupleIsValid(tup)) elog(ERROR, "could not find tuple for amproc entry %u", entryOid); - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); systable_endscan(scan); heap_close(rel, RowExclusiveLock); diff --git a/src/backend/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c index 66d2452dbe2..b063467bbde 100644 --- a/src/backend/commands/operatorcmds.c +++ b/src/backend/commands/operatorcmds.c @@ -368,7 +368,7 @@ RemoveOperatorById(Oid operOid) } } - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c index da2b1ae0e7e..4a758426c39 100644 --- a/src/backend/commands/policy.c +++ b/src/backend/commands/policy.c @@ -397,7 +397,7 @@ RemovePolicyById(Oid policy_id) errmsg("permission denied: \"%s\" is a system catalog", RelationGetRelationName(rel)))); - simple_heap_delete(pg_policy_rel, &tuple->t_self); + CatalogTupleDelete(pg_policy_rel, &tuple->t_self); systable_endscan(sscan); diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 4c8daa59289..a4fbc05a122 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -536,7 +536,7 @@ DropProceduralLanguageById(Oid langOid) if (!HeapTupleIsValid(langTup)) /* should not happen */ elog(ERROR, "cache lookup failed for language %u", langOid); - simple_heap_delete(rel, &langTup->t_self); + CatalogTupleDelete(rel, &langTup->t_self); ReleaseSysCache(langTup); diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index bc0f6539914..3fe1d15052d 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -461,7 +461,7 @@ RemovePublicationById(Oid pubid) if (!HeapTupleIsValid(tup)) elog(ERROR, "cache lookup failed for publication %u", pubid); - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); ReleaseSysCache(tup); @@ -486,13 +486,12 @@ RemovePublicationRelById(Oid proid) elog(ERROR, "cache lookup failed for publication table %u", proid); - pubrel = (Form_pg_publication_rel) GETSTRUCT(tup); /* Invalidate relcache so that publication info is rebuilt. */ CacheInvalidateRelcacheByRelid(pubrel->prrelid); - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c index d14c2698036..722b965d65d 100644 --- a/src/backend/commands/schemacmds.c +++ b/src/backend/commands/schemacmds.c @@ -226,7 +226,7 @@ RemoveSchemaById(Oid schemaOid) if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for namespace %u", schemaOid); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/seclabel.c b/src/backend/commands/seclabel.c index 506c90f6e25..422da8b6b06 100644 --- a/src/backend/commands/seclabel.c +++ b/src/backend/commands/seclabel.c @@ -293,7 +293,7 @@ SetSharedSecurityLabel(const ObjectAddress *object, if (HeapTupleIsValid(oldtup)) { if (label == NULL) - simple_heap_delete(pg_shseclabel, &oldtup->t_self); + CatalogTupleDelete(pg_shseclabel, &oldtup->t_self); else { replaces[Anum_pg_shseclabel_label - 1] = true; @@ -380,7 +380,7 @@ SetSecurityLabel(const ObjectAddress *object, if (HeapTupleIsValid(oldtup)) { if (label == NULL) - simple_heap_delete(pg_seclabel, &oldtup->t_self); + CatalogTupleDelete(pg_seclabel, &oldtup->t_self); else { replaces[Anum_pg_seclabel_label - 1] = true; @@ -432,7 +432,7 @@ DeleteSharedSecurityLabel(Oid objectId, Oid classId) scan = systable_beginscan(pg_shseclabel, SharedSecLabelObjectIndexId, true, NULL, 2, skey); while (HeapTupleIsValid(oldtup = systable_getnext(scan))) - simple_heap_delete(pg_shseclabel, &oldtup->t_self); + CatalogTupleDelete(pg_shseclabel, &oldtup->t_self); systable_endscan(scan); heap_close(pg_shseclabel, RowExclusiveLock); @@ -483,7 +483,7 @@ DeleteSecurityLabel(const ObjectAddress *object) scan = systable_beginscan(pg_seclabel, SecLabelObjectIndexId, true, NULL, nkeys, skey); while (HeapTupleIsValid(oldtup = systable_getnext(scan))) - simple_heap_delete(pg_seclabel, &oldtup->t_self); + CatalogTupleDelete(pg_seclabel, &oldtup->t_self); systable_endscan(scan); heap_close(pg_seclabel, RowExclusiveLock); diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 6ac76b1e565..c148b09cd72 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -521,7 +521,7 @@ DeleteSequenceTuple(Oid relid) if (!HeapTupleIsValid(tuple)) elog(ERROR, "cache lookup failed for sequence %u", relid); - simple_heap_delete(rel, &tuple->t_self); + CatalogTupleDelete(rel, &tuple->t_self); ReleaseSysCache(tuple); heap_close(rel, RowExclusiveLock); diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 5de999928f3..3b708075653 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -501,7 +501,7 @@ DropSubscription(DropSubscriptionStmt *stmt) EventTriggerSQLDropAddObject(&myself, true, true); /* Remove the tuple from catalog. */ - simple_heap_delete(rel, &tup->t_self); + CatalogTupleDelete(rel, &tup->t_self); ReleaseSysCache(tup); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 764071bd11b..878b48d39ef 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8939,7 +8939,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, foundDep->refobjid == attTup->attcollation)) elog(ERROR, "found unexpected dependency for column"); - simple_heap_delete(depRel, &depTup->t_self); + CatalogTupleDelete(depRel, &depTup->t_self); } systable_endscan(scan); @@ -11177,7 +11177,7 @@ RemoveInheritance(Relation child_rel, Relation parent_rel) inhparent = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhparent; if (inhparent == RelationGetRelid(parent_rel)) { - simple_heap_delete(catalogRelation, &inheritsTuple->t_self); + CatalogTupleDelete(catalogRelation, &inheritsTuple->t_self); found = true; break; } @@ -11370,7 +11370,7 @@ drop_parent_dependency(Oid relid, Oid refclassid, Oid refobjid) dep->refobjid == refobjid && dep->refobjsubid == 0 && dep->deptype == DEPENDENCY_NORMAL) - simple_heap_delete(catalogRelation, &depTuple->t_self); + CatalogTupleDelete(catalogRelation, &depTuple->t_self); } systable_endscan(scan); diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 6e652aa66bd..80515bae19c 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -460,7 +460,7 @@ DropTableSpace(DropTableSpaceStmt *stmt) /* * Remove the pg_tablespace tuple (this will roll back if we fail below) */ - simple_heap_delete(rel, &tuple->t_self); + CatalogTupleDelete(rel, &tuple->t_self); heap_endscan(scandesc); diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index b3e89a44f72..d80bff671c0 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -1238,7 +1238,7 @@ RemoveTriggerById(Oid trigOid) /* * Delete the pg_trigger tuple. */ - simple_heap_delete(tgrel, &tup->t_self); + CatalogTupleDelete(tgrel, &tup->t_self); systable_endscan(tgscan); heap_close(tgrel, RowExclusiveLock); diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index 988930b1c55..49668be0d70 100644 --- a/src/backend/commands/tsearchcmds.c +++ b/src/backend/commands/tsearchcmds.c @@ -301,7 +301,7 @@ RemoveTSParserById(Oid prsId) if (!HeapTupleIsValid(tup)) elog(ERROR, "cache lookup failed for text search parser %u", prsId); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); @@ -511,7 +511,7 @@ RemoveTSDictionaryById(Oid dictId) elog(ERROR, "cache lookup failed for text search dictionary %u", dictId); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); @@ -831,7 +831,7 @@ RemoveTSTemplateById(Oid tmplId) elog(ERROR, "cache lookup failed for text search template %u", tmplId); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); ReleaseSysCache(tup); @@ -1139,7 +1139,7 @@ RemoveTSConfigurationById(Oid cfgId) elog(ERROR, "cache lookup failed for text search dictionary %u", cfgId); - simple_heap_delete(relCfg, &tup->t_self); + CatalogTupleDelete(relCfg, &tup->t_self); ReleaseSysCache(tup); @@ -1158,7 +1158,7 @@ RemoveTSConfigurationById(Oid cfgId) while (HeapTupleIsValid((tup = systable_getnext(scan)))) { - simple_heap_delete(relMap, &tup->t_self); + CatalogTupleDelete(relMap, &tup->t_self); } systable_endscan(scan); @@ -1317,7 +1317,7 @@ MakeConfigurationMapping(AlterTSConfigurationStmt *stmt, while (HeapTupleIsValid((maptup = systable_getnext(scan)))) { - simple_heap_delete(relMap, &maptup->t_self); + CatalogTupleDelete(relMap, &maptup->t_self); } systable_endscan(scan); @@ -1472,7 +1472,7 @@ DropConfigurationMapping(AlterTSConfigurationStmt *stmt, while (HeapTupleIsValid((maptup = systable_getnext(scan)))) { - simple_heap_delete(relMap, &maptup->t_self); + CatalogTupleDelete(relMap, &maptup->t_self); found = true; } diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index b848389ab85..d8bd8a50dd8 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -697,7 +697,7 @@ RemoveTypeById(Oid typeOid) if (!HeapTupleIsValid(tup)) elog(ERROR, "cache lookup failed for type %u", typeOid); - simple_heap_delete(relation, &tup->t_self); + CatalogTupleDelete(relation, &tup->t_self); /* * If it is an enum, delete the pg_enum entries too; we don't bother with diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index f2ec3b2d0d8..994c093250b 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -1044,7 +1044,7 @@ DropRole(DropRoleStmt *stmt) /* * Remove the role from the pg_authid table */ - simple_heap_delete(pg_authid_rel, &tuple->t_self); + CatalogTupleDelete(pg_authid_rel, &tuple->t_self); ReleaseSysCache(tuple); @@ -1064,7 +1064,7 @@ DropRole(DropRoleStmt *stmt) while (HeapTupleIsValid(tmp_tuple = systable_getnext(sscan))) { - simple_heap_delete(pg_auth_members_rel, &tmp_tuple->t_self); + CatalogTupleDelete(pg_auth_members_rel, &tmp_tuple->t_self); } systable_endscan(sscan); @@ -1079,7 +1079,7 @@ DropRole(DropRoleStmt *stmt) while (HeapTupleIsValid(tmp_tuple = systable_getnext(sscan))) { - simple_heap_delete(pg_auth_members_rel, &tmp_tuple->t_self); + CatalogTupleDelete(pg_auth_members_rel, &tmp_tuple->t_self); } systable_endscan(sscan); @@ -1606,7 +1606,7 @@ DelRoleMems(const char *rolename, Oid roleid, if (!admin_opt) { /* Remove the entry altogether */ - simple_heap_delete(pg_authmem_rel, &authmem_tuple->t_self); + CatalogTupleDelete(pg_authmem_rel, &authmem_tuple->t_self); } else { |