On Wed, Oct 28, 2026 at 01:35:47PM -0500, Sami Imseih wrote: > Yeah, I mentioned that earlier, and I did not feel right about it either. So I > added back the test that uses pgstat_drop_entry(), and added a separate > test function for the new _of_kind API. The TAP test now drops one entry via > pgstat_drop_entry() and another via pgstat_drop_matching_entries_of_kind(). > > I also renamed the new static helper to pgstat_drop_matching_entries_in_hash() > to match the existing pgstat_reset_matching_entries_in_hash().
My first reaction after reading this patch is why do we need two APIs? We could have pgstat_drop_matching_entries() take an additional PgStat_Kind, matching with all the hash tables if passing an invalid kind? That would mean one routine instead of three as done in this patch, as of two exposed and one static in pgstat_shmem.c. That would also avoid the filter_kind check in the inner loop of pgstat_drop_matching_entries_in_hash(), as done in the patch. -- Michael
signature.asc
Description: PGP signature
