Re: Better shared data structure management and resizable shared data structures - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Better shared data structure management and resizable shared data structures
Date
Msg-id a55446b7-476f-44f0-a5b0-d6791e635614@iki.fi
Whole thread Raw
In response to Re: Better shared data structure management and resizable shared data structures  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List 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




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG 19 release notes and authors
Next
From: Andres Freund
Date:
Subject: Re: pg_get__*_ddl consolidation