pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Unexpected "shared memory block is still in use"
Date: Wed, 04 Sep 2019 10:59:25 -0400
Message-ID: <2079.1567609165@sss.pgh.pa.us> (raw)
In-Reply-To: <c3451ec9-28f1-7655-3227-08997a768e39@2ndquadrant.com>
References: <22224.1557340366@sss.pgh.pa.us>
	<20190509055414.GB1066859@rfd.leadboat.com>
	<2663.1557409654@sss.pgh.pa.us>
	<2226.1557439179@sss.pgh.pa.us>
	<17642.1557442078@sss.pgh.pa.us>
	<20190510072213.GA1098093@rfd.leadboat.com>
	<25485.1557500141@sss.pgh.pa.us>
	<16908.1557521200@sss.pgh.pa.us>
	<20190511190715.GA1124997@rfd.leadboat.com>
	<29530.1565738526@sss.pgh.pa.us>
	<8cd56b77-dfd9-cfbe-cad2-663939b5f510@2ndquadrant.com>
	<11212.1565965138@sss.pgh.pa.us>
	<c3451ec9-28f1-7655-3227-08997a768e39@2ndquadrant.com>

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I agree with this patch and the reasons for it.

OK, thanks for reviewing.

> 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.)

If we did want to assume that we could change postmaster.pid,
it might be best to print the key both ways?

			regards, tom lane





view thread (18+ messages)  latest in thread

Message-ID: <2079.1567609165@sss.pgh.pa.us>
Permalink:  ../2079.1567609165@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2079.1567609165@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, noah@leadboat.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Unexpected "shared memory block is still in use"
  In-Reply-To: <2079.1567609165@sss.pgh.pa.us>

* 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