| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | show size of DSAs and dshash tables in pg_dsm_registry_allocations |
| Date: | 2025-11-26 22:49:49 |
| Message-ID: | aSeEDeznAsHR1_YF@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Nov 25, 2025 at 07:13:03PM -0500, Robert Haas wrote:
> In my ideal world, it would probably show partially-initialized entires
> in some distinguishable way, like with a null size.
I reevaluated this view, and I think we can do what you suggest here.
Right now, we show NULL for DSAs and dshash tables because 1) we might not
be attached to them and 2) we don't have a pointer to the dsa_area * or
dshash_table * in local memory. If we introduce a function that looks up
the size of a DSA given its handle (transiently attaching to the control
segment if needed), we can show the size for all successfully-initialized
entries. Then, we can make NULL mean that the entry was
partially-initialized.
Patch attached.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-rework-DSM-registry-view.patch | text/plain | 6.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2025-11-26 22:55:52 | Re: Some optimizations for COALESCE expressions during constant folding |
| Previous Message | Peter Smith | 2025-11-26 22:24:51 | Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis |