Re: type cache cleanup improvements
Alexander Korotkov <aekorotkov@gmail.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Maintain RelIdToTypeIdCacheHash in TypeCacheOpcCallback()
- bb78e4267817 18.0 landed
-
Fix concurrrently in typcache_rel_type_cache.sql
- aa1e898dea66 18.0 landed
-
Avoid looping over all type cache entries in TypeCacheRelCallback()
- b85a9d046efd 18.0 landed
- c14d4acb8134 18.0 landed
-
Update header comment for lookup_type_cache()
- c1500a1ba7e1 18.0 landed
-
Revert: Avoid looping over all type cache entries in TypeCacheRelCallback()
- 8daa62a10c91 18.0 landed
-
Introduce hash_search_with_hash_value() function
- d0f020037e19 18.0 landed
-
Optimize InvalidateAttoptCacheCallback() and TypeCacheTypCallback()
- 40064a8ee1b3 18.0 landed
-
Refactor initial hash lookup in dynahash.c
- cc5ef90edd80 17.0 landed
-
Rationalize and improve error messages for some jsonpath items
- 92d2ab7554f9 17.0 cited
-
Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY.
- fdd965d074d4 15.0 cited
-
Represent Lists as expansible arrays, not chains of cons-cells.
- 1cff1b95ab6d 13.0 cited
Attachments
- v10-0001-Avoid-looping-over-all-type-cache-entries-in-Typ.patch (application/octet-stream) patch v10-0001
Hi! On Thu, Aug 22, 2024 at 1:02 PM Pavel Borisov <pashkin.elfe@gmail.com> wrote: Looked at v9: > Patch looks good to me. I'd only suggest comments changes: > > "The map from relation's OID to the corresponding composite type OID" -> "The mapping of relation's OID to the corresponding composite type OID" > "We're keeping the map entry when corresponding typentry have either TCFLAGS_HAVE_PG_TYPE_DATA, or TCFLAGS_OPERATOR_FLAGS, or tupdesc. That is we're keeping map entry if the entry has something to clear." -> "We're keeping the map entry when the corresponding typentry has something to clear i.e it has either TCFLAGS_HAVE_PG_TYPE_DATA, or TCFLAGS_OPERATOR_FLAGS, or tupdesc." > "Invalidate particular TypeCacheEntry on Relcache inval callback" - remove extra tabs before. Maybe also add empty line above. > "Typically shouldn't be a problem" -> "Typically this shouldn't affect performance" > "Relid = 0, so we need" -> "Relid is invalid. By convention we need" > "if cleaned TCFLAGS_HAVE_PG_TYPE_DATA flag" -> "if we cleaned TCFLAGS_HAVE_PG_TYPE_DATA flag previously" > "+/* > + * Delete entry RelIdToTypeIdCacheHash if needed after resetting of the > + * TCFLAGS_HAVE_PG_TYPE_DATA flag, or any of TCFLAGS_OPERATOR_FLAGS flags, > + * or tupDesc if needed." - remove one "if needed" Thank you for your feedback. I've integrated all your edits except the formatting change of InvalidateCompositeTypeCacheEntry() header comment. I think the functions below have the same formatting of header comments, and it's not necessary to change format. If no objections, I'm planning to push this after reverting PARTITION SPLIT/MERGE. ------ Regards, Alexander Korotkov Supabase