From: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(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 20:07:31 |
Message-ID: | 66DDCA99-7624-4695-8D16-5A501144931D@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 3 Jun 2025, at 10:53 PM, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> 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
Attachment | Content-Type | Size |
---|---|---|
v4-0001-First-attempt-towards-a-pg_dsm_registry-view.-Ite.patch | application/octet-stream | 6.8 KB |
v4-0002-Rename-view-to-pg_dsm_registry_allocations-and-fu.patch | application/octet-stream | 8.0 KB |
v4-0003-Add-doc-entry-for-pg_shmem_allocations_numa.patch | application/octet-stream | 2.6 KB |
v4-0004-Cleanup-includes-in-pg_get_dsm_registry_allocatio.patch | application/octet-stream | 2.3 KB |
unknown_filename | text/plain | 1 byte |
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2025-06-03 20:23:42 | Re: like pg_shmem_allocations, but fine-grained for DSM registry ? |
Previous Message | Nathan Bossart | 2025-06-03 19:53:15 | Re: like pg_shmem_allocations, but fine-grained for DSM registry ? |