| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Sami Imseih <samimseih(at)gmail(dot)com> |
| Cc: | Tristan Partin <tristan(at)partin(dot)io>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add pg_stat_kind_info system view |
| Date: | 2026-08-03 22:58:31 |
| Message-ID: | anEdF2lBJ-kY8JKv@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Aug 03, 2026 at 05:46:37PM -0500, Sami Imseih wrote:
> /* Bump reference count for this segment in shared memory. */
> LWLockAcquire(DynamicSharedMemoryControlLock, LW_EXCLUSIVE);
> nitems = dsm_control->nitems;
> for (i = 0; i < nitems; ++i)
> {
> /*
> * If the reference count is 0, the slot is actually unused. If the
> * reference count is 1, the slot is still in use, but the segment is
> * in the process of going away; even if the handle matches, another
> * slot may already have started using the same handle value by
> * coincidence so we have to keep searching.
> */
> if (dsm_control->item[i].refcnt <= 1)
> continue;
> ```
Oh, that could be nice as a change on its own.
> I will need to do some benchmarking to see if there are improvement, but
> these will be optimizations for for high churn cases.
I could buy plugging in pgstats into the registry if it proves that
the degraded numbers you have seen are gone in the extreme high-churn
case, FWIW.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexandra Wang | 2026-08-03 23:06:25 | Re: Is there value in having optimizer stats for joins/foreignkeys? |
| Previous Message | Masahiko Sawada | 2026-08-03 22:53:06 | Re: Support UUIDv6 in uuid_extract_timestamp() |