Re: Proposal: Add a callback data parameter to GetNamedDSMSegment - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
Date
Msg-id aTxv6mJtzNYUn1VB@nathan
Whole thread Raw
In response to Re: Proposal: Add a callback data parameter to GetNamedDSMSegment  (Sami Imseih <samimseih@gmail.com>)
Responses Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
List 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



pgsql-hackers by date:

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