Re: add function for creating/attaching hash table in DSM registry

Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2025-06-05T11:22:58Z
Lists: pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:

> +typedef struct NamedDSMHashState
> +{
> +	dsa_handle	dsah;
> +	dshash_table_handle dshh;
> +	int			dsa_tranche;
> +	char		dsa_tranche_name[68];	/* name + "_dsa" */
> +	int			dsh_tranche;
> +	char		dsh_tranche_name[68];	/* name + "_dsh" */
> +} NamedDSMHashState;

I don't have enough knowledge to review the rest of the patch, but
shouldn't this use NAMEDATALEN, rather than hard-coding the default
length?

- ilmari



Commits

  1. Fix cross-version upgrade test breakage from commit fe07100e82.

  2. Add GetNamedDSA() and GetNamedDSHash().

  3. Remove dynamic_shared_memory_type=none

  4. Introduce dynamic shared memory areas.

  5. Relax the requirement that all lwlocks be stored in a single array.