Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5Wl2-0003UB-Pp for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Sep 2019 14:59:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5Wl1-0004JS-I1 for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Sep 2019 14:59:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5Wl1-0003rb-2m for pgsql-hackers@lists.postgresql.org; Wed, 04 Sep 2019 14:59:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i5Wkt-00017M-Tg for pgsql-hackers@lists.postgresql.org; Wed, 04 Sep 2019 14:59:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x84ExPla002080; Wed, 4 Sep 2019 10:59:25 -0400 From: Tom Lane To: Peter Eisentraut cc: Noah Misch , pgsql-hackers@lists.postgresql.org Subject: Re: Unexpected "shared memory block is still in use" In-reply-to: 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> Comments: In-reply-to Peter Eisentraut message dated "Wed, 04 Sep 2019 13:36:38 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2078.1567609165.1@sss.pgh.pa.us> Date: Wed, 04 Sep 2019 10:59:25 -0400 Message-ID: <2079.1567609165@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut 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