From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: like pg_shmem_allocations, but fine-grained for DSM registry ? |
Date: | 2025-06-03 19:53:15 |
Message-ID: | aD9Sqygq6nhtyga1@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 03, 2025 at 10:39:25PM +0300, Florents Tselai wrote:
> Thanks for the detailed review Nathan
Thanks for the updated patch!
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR, (errmsg("pg_get_dsm_registry_allocations must be used in a SRF context")));
InitMaterializedSRF() takes care of this for you.
+typedef struct
+{
+ Tuplestorestate *tupstore;
+ TupleDesc tupdesc;
+} DSMRegistrySRFContext;
This appears to be unused.
+#include "fmgr.h"
+#include "funcapi.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
Do we need fmgr.h and miscadmin.h? Also, please alphabetize these into the
existing list of #includes.
+ values[1] = Int64GetDatum(entry->size);
I think there's a sign mismatch problem here, but it seems implausible in
practice. pg_get_shmem_allocations() does the same thing.
+ <sect1 id="view-pg-dsm-registry-allocations">
+ <title><structname>pg_dsm_registry_allocations</structname></title>
We need to add an entry into the System Views table in the Overview page,
too.
--
nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Florents Tselai | 2025-06-03 20:07:31 | Re: like pg_shmem_allocations, but fine-grained for DSM registry ? |
Previous Message | Florents Tselai | 2025-06-03 19:39:25 | Re: like pg_shmem_allocations, but fine-grained for DSM registry ? |