Re: Unexpected "shared memory block is still in use"
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@lists.postgresql.org
Date: 2019-09-05T12:28:08Z
Lists: pgsql-hackers
On 2019-09-04 16:59, Tom Lane wrote:
>> A related point, perhaps we should change the key printed into
>> postmaster.pid to be in hexadecimal format ("0x08x") so that it matches
>> what ipcs prints.
> Hmm, that depends on whose ipcs you use :-(. A quick survey
> of my machines says it's
>
> key shmid
>
> Linux: hex decimal
> FreeBSD: decimal decimal
> NetBSD: decimal decimal
> OpenBSD: decimal decimal
> macOS: hex decimal
> HPUX: hex (not printed)
>
> There's certainly room to argue that hex+decimal is most popular,
> but I'm not sure that that outweighs possible compatibility issues
> from changing postmaster.pid contents. (Admittedly, it's not real
> clear that anything would be paying attention to the shmem key,
> so maybe there's no compatibility issue.)
Let's just leave it decimal then. At least then it's easier to compare
it to ls -i output.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Use data directory inode number, not port, to select SysV resource keys.
- 7de19fbc0b1a 13.0 landed
-
Cope with EINVAL and EIDRM shmat() failures in PGSharedMemoryAttach.
- b1cde67a4f94 9.4.23 landed
- a73c8caea46c 9.6.14 landed
- 91a05390c33c 9.5.18 landed
- 803f90ab795b 11.4 landed
- 610747d86e46 12.0 landed
- 3dcf45af560e 10.9 landed
-
Consistently test for in-use shared memory.
- c098509927f9 12.0 cited