Re: Shared Memory: How to use SYSV rather than MMAP ?

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: "REIX, Tony" <tony.reix@atos.net>
Cc: Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, "EMPEREUR-MOT, SYLVIE" <sylvie.empereur-mot@atos.net>
Date: 2019-02-07T04:44:15Z
Lists: pgsql-hackers
On Sun, Feb 3, 2019 at 10:56 PM Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> Committed 0001.

> I've moved the CF entry to the next Commitfest, since we still have to
> fix up and commit the 0002 patch for AIX.

For the record, one problem with the shared_memory_type=sysv patch as
committed is that if you set huge_pages=on on Linux, it is allowed but
ignored.  I think we should respect it by passing SHM_HUGETLB to
shmget(), which, although not especially interesting as a feature
(given that there is no good reason for Linux users to prefer System V
shared memory anyway), it has the advantage that the code path would
be nearly identical to the proposed AIX huge page support (just a
different flag name), which is useful for development and testing (by
those of us with no AIX access).  Then the AIX support will be a very
tiny patch on top of that, which Tony can verify.

-- 
Thomas Munro
http://www.enterprisedb.com


Commits

  1. Add shared_memory_type GUC.

  2. Dramatically reduce System V shared memory consumption.