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/misc/superuser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/misc/superuser.c') diff --git a/src/backend/utils/misc/superuser.c b/src/backend/utils/misc/superuser.c index e70b1f5ccfb..bbc160110db 100644 --- a/src/backend/utils/misc/superuser.c +++ b/src/backend/utils/misc/superuser.c @@ -36,7 +36,7 @@ static Oid last_roleid = InvalidOid; /* InvalidOid == cache not valid */ static bool last_roleid_is_super = false; static bool roleid_callback_registered = false; -static void RoleidCallback(Datum arg, int cacheid, ItemPointer tuplePtr); +static void RoleidCallback(Datum arg, int cacheid, uint32 hashvalue); /* @@ -96,11 +96,11 @@ superuser_arg(Oid roleid) } /* - * UseridCallback + * RoleidCallback * Syscache inval callback function */ static void -RoleidCallback(Datum arg, int cacheid, ItemPointer tuplePtr) +RoleidCallback(Datum arg, int cacheid, uint32 hashvalue) { /* Invalidate our local cache in case role's superuserness changed */ last_roleid = InvalidOid; -- cgit v1.2.3