Re: a couple of small cleanup patches for DSM-related code

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-06-05T01:20:09Z
Lists: pgsql-hackers
On Wed, Jun 04, 2025 at 01:53:06PM -0700, Masahiko Sawada wrote:
> It seems okay to me to commit it to HEAD as it's a cosmetic change and
> improves the consistency between v18 and 19.

Right.  It looks confusing to leave these at 0 rather than NULL as
they mean a pointer, for the same reasons as what you have documented
in 5fe08c006c82.  Doing that now or waiting for v19 does not make much
difference.  Anyway, there's always the less-noise-when-backpatching
argument, so if you apply that now on HEAD that's fine IMO.
--
Michael

Commits

  1. Use NULL instead of 0 for pointer arguments.

  2. Fixed signed/unsigned mismatch in test_dsm_registry.

  3. Use NULL instead of 0 for 'arg' argument in dshash_create() calls.

  4. Introduce the dynamic shared memory registry.