Re: Remove PG_MMAP_FLAGS

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter@eisentraut.org>
Date: 2026-01-22T19:17:08Z
Lists: pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> Over [1] Peter mentioned that PG_MMAP_FLAGS is not used for
> portability even though it's placed in portability/mem.h. That might
> have been the intention when it was added in
> b0fc0df9364d2d2d17c0162cf3b8b59f6cb09f67. But history does not show it
> being used that way at any point in time. Per suggestion removing that
> macro and instead using the flags directly in CreateAnonymousSegment()
> which is the only place where it's used.

I think you attached the wrong patch?  This one doesn't touch
PG_MMAP_FLAGS.

			regards, tom lane



Commits

  1. Remove PG_MMAP_FLAGS from mem.h

  2. Dramatically reduce System V shared memory consumption.