Re: [PATCH] pgstat: Add helper to drop entries from a stats kind's hash

From: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] pgstat: Add helper to drop entries from a stats kind's hash
Date: 2026-10-30 00:05:14
Message-ID: CAN12+YKh7=n6CYMVfrC4VQbHDQ_fYmGjGTb_jaDeDjUUyg0O2w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Instead of allocating the dshash_table pointer in the loop, perhaps
> use temporary variables to store the number of hashtables and an array
> of them. That would matter if somebody would like to extend this API
> to a subset of N hashtables, where 1 < N < num_var_hashes?

Ok, there maybe a reason for the subset use case. v4 attached
does it that way.

--
Sami

Attachment Content-Type Size
v4-0001-pgstat-Add-kind-filter-to-pgstat_drop_matching_en.patch application/octet-stream 11.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2026-10-30 00:30:37 Re: RI fastpath misses checking EXECUTE on functions
Previous Message Tom Lane 2026-10-29 23:45:44 Re: Reduce logging during prepared transaction recovery