Revise sinval code to remove no-longer-used tuple TID from inval messages.
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam.c | modified | +15 −15 |
| src/backend/catalog/namespace.c | modified | +2 −2 |
| src/backend/nodes/copyfuncs.c | modified | +1 −2 |
| src/backend/nodes/outfuncs.c | modified | +1 −3 |
| src/backend/optimizer/plan/setrefs.c | modified | +10 −13 |
| src/backend/optimizer/util/predtest.c | modified | +2 −2 |
| src/backend/parser/parse_oper.c | modified | +2 −2 |
| src/backend/utils/adt/acl.c | modified | +2 −2 |
| src/backend/utils/cache/attoptcache.c | modified | +1 −1 |
| src/backend/utils/cache/catcache.c | modified | +30 −18 |
| src/backend/utils/cache/inval.c | modified | +110 −111 |
| src/backend/utils/cache/plancache.c | modified | +10 −10 |
| src/backend/utils/cache/spccache.c | modified | +1 −1 |
| src/backend/utils/cache/ts_cache.c | modified | +1 −1 |
| src/backend/utils/misc/superuser.c | modified | +3 −3 |
| src/include/nodes/plannodes.h | modified | +2 −3 |
| src/include/storage/sinval.h | modified | +9 −16 |
| src/include/utils/catcache.h | modified | +3 −3 |
| src/include/utils/inval.h | modified | +5 −3 |