Re: Better shared data structure management and resizable shared data structures

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, chaturvedipalak1911(at)gmail(dot)com
Subject: Re: Better shared data structure management and resizable shared data structures
Date: 2026-04-05 20:06:38
Message-ID: f1d04668-be37-472c-8b18-753b76726de5@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here's patch version 12 [*]. I believe I've addressed all the feedback,
and I feel this is in pretty good shape now. There hasn't been any big
design changes lately.

One notable change is that I replaced the separate
{request|init|attach}_fn_arg fields in ShmemCallbacks with a single
'opaque_arg' field, and added a brief comment to it. You both commented
on whether we need that at all, and maybe you're right that we don't,
but at least it's now just one field rather than three. As before,
callers can simply ignore it if they don't need it.

[*] also available at
https://github.com/hlinnaka/postgres/tree/shmem-init-refactor-12

- Heikki

Attachment Content-Type Size
v12-0001-Move-some-code-from-shmem.c-and-shmem.h.patch text/x-patch 15.9 KB
v12-0002-Introduce-a-new-mechanism-for-registering-shared.patch text/x-patch 62.0 KB
v12-0003-Add-test-module-to-test-after-startup-shmem-allo.patch text/x-patch 10.2 KB
v12-0004-Convert-pg_stat_statements-to-use-the-new-shmem-.patch text/x-patch 11.3 KB
v12-0005-Introduce-registry-of-built-in-subsystems.patch text/x-patch 8.3 KB
v12-0006-Convert-lwlock.c-to-use-the-new-shmem-allocation.patch text/x-patch 10.2 KB
v12-0007-Use-the-new-shmem-allocation-function-in-a-few-c.patch text/x-patch 46.3 KB
v12-0008-Refactor-shmem-initialization-code-in-predicate..patch text/x-patch 10.7 KB
v12-0009-Convert-SLRUs-to-use-the-new-shmem-allocation-fu.patch text/x-patch 85.1 KB
v12-0010-Convert-AIO-to-use-the-shmem-allocation-function.patch text/x-patch 14.8 KB
v12-0011-Add-alignment-option-to-ShmemRequestStruct.patch text/x-patch 5.3 KB
v12-0012-Convert-buffer-manager-to-the-new-shmem-allocati.patch text/x-patch 16.2 KB
v12-0013-Convert-all-remaining-subsystems-to-use-the-new-.patch text/x-patch 110.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-04-05 20:15:03 Re: CREATE SCHEMA ... CREATE DOMAIN support
Previous Message Andres Freund 2026-04-05 20:03:49 Re: pg_get__*_ddl consolidation