Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qRulO-003bOQ-HJ for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Aug 2023 13:22:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qRulL-007fmi-Hw for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Aug 2023 13:22:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qRulL-007fma-9q for pgsql-bugs@lists.postgresql.org; Fri, 04 Aug 2023 13:22:39 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qRulI-000Xoa-GB for pgsql-bugs@lists.postgresql.org; Fri, 04 Aug 2023 13:22:38 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 089AA240006; Fri, 4 Aug 2023 13:22:32 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------4DBQW00jbDCUp6F42dcwM0j5" Message-ID: <3fd3eea4-3c03-3379-1ca1-d1f5d765d4d6@dunslane.net> Date: Fri, 4 Aug 2023 09:22:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US To: jkr0103@gmail.com, pgsql-bugs@lists.postgresql.org References: <18049-8a6848d6272247fc@postgresql.org> From: Andrew Dunstan Subject: Re: BUG #18049: dynamic_shared_memory_type's value `posix` doesn't have any effect, syscall shm_get executes In-Reply-To: <18049-8a6848d6272247fc@postgresql.org> X-GND-Sasl: adsend@dunslane.net List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------4DBQW00jbDCUp6F42dcwM0j5 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023-08-04 Fr 01:22, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 18049 > Logged by: Jitender Kumar > Email address:jkr0103@gmail.com > PostgreSQL version: 12.1 > Operating system: ubuntu 20.04 > Description: > > Expected `shm_open` syscall for the `posix` value of > `dynamic_shared_memory_type` parameter but strace shows `shm_get` being > executed. > src/backend/port/sysv_shmem. says:  * As of PostgreSQL 9.3, we normally allocate only a very small amount of  * System V shared memory, and only for the purposes of providing an  * interlock to protect the data directory. while src/backend/storage/ipc/dsm_impl.c says:  * This file provides low-level APIs for creating and destroying shared  * memory segments using several different possible techniques. We refer  * to these segments as dynamic because they can be created, altered, and  * destroyed at any point during the server life cycle.  This is unlike  * the main shared memory segment, of which there is always exactly one  * and which is always mapped at a fixed address in every PostgreSQL  * background process. So AIUI you should always see a call like this when Postgres starts. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------4DBQW00jbDCUp6F42dcwM0j5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2023-08-04 Fr 01:22, PG Bug reporting form wrote:
The following bug has been logged on the website:

Bug reference:      18049
Logged by:          Jitender Kumar
Email address:      jkr0103@gmail.com
PostgreSQL version: 12.1
Operating system:   ubuntu 20.04
Description:        

Expected `shm_open` syscall for the `posix` value of
`dynamic_shared_memory_type` parameter but strace shows `shm_get` being
executed.


src/backend/port/sysv_shmem. says:

 * As of PostgreSQL 9.3, we normally allocate only a very small amount of
 * System V shared memory, and only for the purposes of providing an
 * interlock to protect the data directory.

while src/backend/storage/ipc/dsm_impl.c says:

 * This file provides low-level APIs for creating and destroying shared
 * memory segments using several different possible techniques.  We refer
 * to these segments as dynamic because they can be created, altered, and
 * destroyed at any point during the server life cycle.  This is unlike
 * the main shared memory segment, of which there is always exactly one
 * and which is always mapped at a fixed address in every PostgreSQL
 * background process.

So AIUI you should always see a call like this when Postgres starts.



cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------4DBQW00jbDCUp6F42dcwM0j5--