From b5282aa893e565b7844f8237462cb843438cdd5e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 16 Aug 2011 19:27:46 -0400 Subject: Revise sinval code to remove no-longer-used tuple TID from inval messages. This requires adjusting the API for syscache callback functions: they now get a hash value, not a TID, to identify the target tuple. Most of them weren't paying any attention to that argument anyway, but plancache did require a small amount of fixing. Also, improve performance a trifle by avoiding sending duplicate inval messages when a heap_update isn't changing the catcache lookup columns. --- src/backend/utils/adt/acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/acl.c') diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 3fa95e2fd39..e79ba50ad33 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -112,7 +112,7 @@ static AclMode convert_tablespace_priv_string(text *priv_type_text); static AclMode convert_role_priv_string(text *priv_type_text); static AclResult pg_role_aclcheck(Oid role_oid, Oid roleid, AclMode mode); -static void RoleMembershipCacheCallback(Datum arg, int cacheid, ItemPointer tuplePtr); +static void RoleMembershipCacheCallback(Datum arg, int cacheid, uint32 hashvalue); static Oid get_role_oid_or_public(const char *rolname); @@ -4355,7 +4355,7 @@ initialize_acl(void) * Syscache inval callback function */ static void -RoleMembershipCacheCallback(Datum arg, int cacheid, ItemPointer tuplePtr) +RoleMembershipCacheCallback(Datum arg, int cacheid, uint32 hashvalue) { /* Force membership caches to be recomputed on next use */ cached_privs_role = InvalidOid; -- cgit v1.2.3