| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: SIGSEGV in dynahash |
| Date: | 2026-08-15 23:32:16 |
| Message-ID: | aoD3ACTRYXaF7t1-@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Tom Lane | 2026-08-15 16:12:29 | Re: SIGSEGV in dynahash |