Re: Unexpected "shared memory block is still in use"

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Unexpected "shared memory block is still in use"
Date: 2019-09-05 12:28:08
Message-ID: 6cefc482-b163-1c3d-48fd-344d99cb137f@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-05 13:23:11 Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)
Previous Message Peter Eisentraut 2019-09-05 12:21:34 Re: Plug-in common/logging.h with vacuumlo and oid2name