From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Preallocate some DSM space at startup.
Date: Fri, 31 Jul 2020 15:26:26 +0900
Message-ID: <20200731062626.GD3317@paquier.xyz> (raw)
In-Reply-To: <E1k1O0D-0001Cg-SJ@gemulon.postgresql.org>
References: <E1k1O0D-0001Cg-SJ@gemulon.postgresql.org>
Hi Thomas,
On Fri, Jul 31, 2020 at 05:54:45AM +0000, Thomas Munro wrote:
> Preallocate some DSM space at startup.
>
> Create an optional region in the main shared memory segment that can be
> used to acquire and release "fast" DSM segments, and can benefit from
> huge pages allocated at cluster startup time, if configured. Fall back
> to the existing mechanisms when that space is full. The size is
> controlled by a new GUC min_dynamic_shared_memory, defaulting to 0.
>
> Main region DSM segments initially contain whatever garbage the memory
> held last time they were used, rather than zeroes. That change revealed
> that DSA areas failed to initialize themselves correctly in memory that
> wasn't zeroed first, so fix that problem.
longfin is complaning on this one:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=longfin&dt=2020-07-31%2005%3A59%3A08
guc.c:2241:38: error: implicit conversion from 'unsigned long' to
'int' changes value from 17592186044415 to -1
[-Werror,-Wconstant-conversion]
0, 0, Min(INT_MAX, SIZE_MAX / 1024 / 1024),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../../../../src/include/c.h:927:40: note: expanded from macro 'Min'
#define Min(x, y) ((x) < (y) ? (x) : (y))
^
1 error generated.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, tmunro@postgresql.org
Subject: Re: pgsql: Preallocate some DSM space at startup.
In-Reply-To: <20200731062626.GD3317@paquier.xyz>
References: <E1k1O0D-0001Cg-SJ@gemulon.postgresql.org> <20200731062626.GD3317@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox