From: Nathan Bossart <nathandbossart@gmail.com>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations
Date: Tue, 2 Dec 2025 10:31:33 -0600
Message-ID: <aS8UZc4MqwYjoRH8@nathan> (raw)
In-Reply-To: <CAH2L28sQwRPd1oAddG3NGFDC7xRsvO7xLrvqptm_eVirFGqhqQ@mail.gmail.com>
References: <aSeEDeznAsHR1_YF@nathan>
<CAH2L28tr5q965MbD2TroyTc-Ey+b-z3=3kpWAuGg6w7qQwwChA@mail.gmail.com>
<aS20Z42rPHecTljS@nathan>
<CAH2L28sQwRPd1oAddG3NGFDC7xRsvO7xLrvqptm_eVirFGqhqQ@mail.gmail.com>
On Tue, Dec 02, 2025 at 02:28:29PM +0530, Rahila Syed wrote:
> Thank you for highlighting the discussions. I'm unsure about the best
> approach here, but I think it would be safe to stay consistent with the
> rest of the code in dsa.c, especially since it's unclear that the use of
> LW_EXCLUSIVE for reading values in dsa is a mistake.
Okay. I switched to LW_EXCLUSIVE and will consider starting a new thread
to use LW_SHARED when possible in dsa.c.
> Sorry for the confusion, I am trying to say that we can change the
> following comment
>
> + *The area must have
> + * been created with dsa_create (not dsa_create_in_place).
>
> to say this:
>
> "The area must have been created using dsm_segments"
>
> Since, this function can report the size of an area created with
> dsa_create_in_place too, as long as the area is created using
> dsm_segments.
It cannot report the size of in-place areas, at least not without some
changes, because (AFAICT) there's no way to get a dsa_handle for an
in-place segment.
I've now committed the patch. Thanks everyone for reviewing!
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, rahilasyed90@gmail.com, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations
In-Reply-To: <aS8UZc4MqwYjoRH8@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox