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

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: 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 15:39:37
Message-ID: a55446b7-476f-44f0-a5b0-d6791e635614@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/04/2026 19:32, Ashutosh Bapat wrote:
> test_shmem declares MODULE_big and OBJS which seems to be old
> fashioned, newer modules seem to be using MODULES.

I don't think it's a matter of old or new. MODULE_big is used when you
have multiple .o that are linked together into one .so file, while
MODULES is used if each .o file is linked into a separate .so file. If
there's only one .o file and .so file, then it doesn't really matter
which you use, and I think we have examples of both.

> Also it should use NO_INSTALLCHECK.
>
> /*
> * Alignment of the starting address. If not set, defaults to cacheline
> * boundary. Must be a power of two.
> */
> size_t alignment;
>
> We don't seem to enforce the "must be a power of two" rule anywhere.
> We should at least validate it.

Will add.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-04-05 15:40:33 Re: pg_get__*_ddl consolidation
Previous Message Tom Lane 2026-04-05 15:10:52 Re: PG 19 release notes and authors