pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Konstantin Knizhnik <knizhnik@garret.ru>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: SIGSEGV in dynahash
Date: Sun, 16 Aug 2026 08:32:16 +0900
Message-ID: <aoD3ACTRYXaF7t1-@paquier.xyz> (raw)
In-Reply-To: <16448.1786810349@sss.pgh.pa.us>
References: <d59221f2-b3d2-41ad-8bf0-d581b42e4cba@garret.ru>
	<16448.1786810349@sss.pgh.pa.us>

On Sat, Aug 15, 2026 at 12:12:29PM -0400, Tom Lane wrote:
> Yeah.  I'm not too pleased with 9fe9ecd516b for a different reason.
> 
> In pursuit of what seems to be a merely cosmetic goal (ie make shared
> hashes be reported differently in pg_shmem_allocations), it's made a
> fundamental and IMO possibly destabilizing change in the behavior of
> shared-memory hash tables. To wit, it is no longer possible to expand
> a shared hash table beyond its startup-time allocation.

There is a difference between shmem_hash.c and dynahash.c.  dynahash.c
is able to support a growing size, but it's not the case of
shmem_hash.c.

Note also some comments in dynahash.c:
 * table grows much beyond the initial size.  (Currently, shared memory hash
 * tables are only created by ShmemRequestHash()/ShmemInitHash() though, which
 * doesn't support growing at all.) 

shmem_hash_create() also claims the non-growth argument as true as we
would need to grow the underlying shmem region linked with a hash
table defined by shmem_hash.c.

Or am I missing something?
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../aoD3ACTRYXaF7t1-@paquier.xyz/2-signature.asc)
  download

view thread (6+ messages)  latest in thread

Message-ID: <aoD3ACTRYXaF7t1-@paquier.xyz>
Permalink:  ../aoD3ACTRYXaF7t1-@paquier.xyz/
Also on:    postgresql.org/message-id/aoD3ACTRYXaF7t1-@paquier.xyz

 · 

reply

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-bugs@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, knizhnik@garret.ru, hlinnaka@iki.fi, pgsql-bugs@lists.postgresql.org
  Subject: Re: SIGSEGV in dynahash
  In-Reply-To: <aoD3ACTRYXaF7t1-@paquier.xyz>

* 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