aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/predtest.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-08-16 19:27:46 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-08-16 19:27:46 -0400
commitb5282aa893e565b7844f8237462cb843438cdd5e (patch)
treeb19170597a0a94685cc8c978c1c5800c411d02d1 /src/backend/optimizer/util/predtest.c
parent632ae6829f7abda34e15082c91d9dfb3fc0f298b (diff)
downloadpostgresql-b5282aa893e565b7844f8237462cb843438cdd5e.tar.gz
postgresql-b5282aa893e565b7844f8237462cb843438cdd5e.zip
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.
Diffstat (limited to 'src/backend/optimizer/util/predtest.c')
-rw-r--r--src/backend/optimizer/util/predtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c
index beabafb5a86..cb10a31b077 100644
--- a/src/backend/optimizer/util/predtest.c
+++ b/src/backend/optimizer/util/predtest.c
@@ -101,7 +101,7 @@ static bool list_member_strip(List *list, Expr *datum);
static bool btree_predicate_proof(Expr *predicate, Node *clause,
bool refute_it);
static Oid get_btree_test_op(Oid pred_op, Oid clause_op, bool refute_it);
-static void InvalidateOprProofCacheCallBack(Datum arg, int cacheid, ItemPointer tuplePtr);
+static void InvalidateOprProofCacheCallBack(Datum arg, int cacheid, uint32 hashvalue);
/*
@@ -1738,7 +1738,7 @@ get_btree_test_op(Oid pred_op, Oid clause_op, bool refute_it)
* Callback for pg_amop inval events
*/
static void
-InvalidateOprProofCacheCallBack(Datum arg, int cacheid, ItemPointer tuplePtr)
+InvalidateOprProofCacheCallBack(Datum arg, int cacheid, uint32 hashvalue)
{
HASH_SEQ_STATUS status;
OprProofCacheEntry *hentry;