Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
Date: 2025-12-12 19:41:30
Message-ID: aTxv6mJtzNYUn1VB@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 12, 2025 at 12:48:52PM -0600, Sami Imseih wrote:
> As far as testing, I did not think it's worth it since in the cases out
> there now a NULL void * will result in an error when calling
> LWLockNewTrancheId.

I think we should pass NULL to all the existing in-tree calls to
GetNamedDSMSegment(), except for perhaps a new test in test_dsm_registry
that verifies the pointer value in the initialization function. In all the
other cases, there's no issue with hard-coding the tranche names, so we can
keep those simple.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2025-12-12 19:45:42 Re: Import Statistics in postgres_fdw before resorting to sampling.
Previous Message Andres Freund 2025-12-12 19:32:41 Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers