From: Onkobu <onkobu@onkobutanaake.de>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: michael@paquier.xyz
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17938: could not open shared memory segment "/PostgreSQL.615216676": No such file or directory
Date: Mon, 29 May 2023 16:56:09 +0200
Message-ID: <0dc75a20-e4c7-720e-b3df-ef5e1796183a@onkobutanaake.de> (raw)
In-Reply-To: <20230524.100951.1995911263879377795.horikyota.ntt@gmail.com>
References: <17938-ecf9088be46db806@postgresql.org>
<ZGvv/y6FXHsE+mLu@paquier.xyz>
<20230524.095735.1482430634818489160.horikyota.ntt@gmail.com>
<20230524.100951.1995911263879377795.horikyota.ntt@gmail.com>
I finally found the source: a broken test in a script that initiates a
chroot environment. For some reason the author decided to write this:
test -L /dev/shm && rm /dev/shm && mkdir /dev/shm
Instead of re-creating a symlink based /dev/shm as true mountpoint it
always did so.
Since the issue came up from time to time without any clear relation I
scanned scripts on the machine that require root permissions – not so
may to dig through.
This bogus check with immediate action was replaced with a bail out of
the script in case this would be true. No bug in PostgreSQL.
Am 24.05.23 um 03:09 schrieb Kyotaro Horiguchi:
> At Wed, 24 May 2023 09:57:35 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in
>> dynamic_shared_memory_type. Outside of Windows, it first prefers
>> posix, then sysv and finally mmap. Thus it is quite usual to use posix
>> for DSM segments. Actually posix is defaultly used for
>
> It is written in the documentation.
>
> https://www.postgresql.org/docs/15/runtime-config-resource.html#GUC-DYNAMIC-SHARED-MEMORY-TYPE
>
>> The use of the mmap option, which is not the default on any
>> platform, is generally discouraged because the operating system may
>> write modified pages back to disk repeatedly, increasing system I/O
>> load; however, it may be useful for debugging, when the pg_dynshmem
>> directory is stored on a RAM disk, or when other shared memory
>> facilities are not available.
>
> regards.
>
--
------
Web: http://onkobutanaake.de - mit RSS-Feed
Verschlüsselte/ signierte Elektropost (PGP/GPG) an diese Adresse bevorzugt,
öffentlicher Schlüssel http://onkobutanaake.de/onkobutanaake.asc
-
Encrypted/ signed electro-mail (PGP/GPG) to this address preferred,
public key http://onkobutanaake.de/onkobutanaake.asc
Fingerprint 6261 2530 89DA 93E3 2D9F A0C2 B660 481D 9F77 A942
Attachments:
OpenPGP_0xB660481D9F77A942.asc (application/pgp-keys, 9.0K) download
OpenPGP_signature (application/pgp-signature, 487B) 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-bugs@postgresql.org
Cc: onkobu@onkobutanaake.de, horikyota.ntt@gmail.com, michael@paquier.xyz
Subject: Re: BUG #17938: could not open shared memory segment "/PostgreSQL.615216676": No such file or directory
In-Reply-To: <0dc75a20-e4c7-720e-b3df-ef5e1796183a@onkobutanaake.de>
References: <17938-ecf9088be46db806@postgresql.org> <ZGvv/y6FXHsE+mLu@paquier.xyz> <20230524.095735.1482430634818489160.horikyota.ntt@gmail.com> <20230524.100951.1995911263879377795.horikyota.ntt@gmail.com> <0dc75a20-e4c7-720e-b3df-ef5e1796183a@onkobutanaake.de>
* 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