Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyQEP-0002Rz-GT for pgsql-committers@arkaria.postgresql.org; Sat, 30 Sep 2017 22:27:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dyQEP-0007F9-1p for pgsql-committers@arkaria.postgresql.org; Sat, 30 Sep 2017 22:27:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dyQE9-0006og-Ts for pgsql-committers@postgresql.org; Sat, 30 Sep 2017 22:27:17 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dyQE6-0002Cg-Su for pgsql-committers@postgresql.org; Sat, 30 Sep 2017 22:27:17 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9846D21BD2; Sat, 30 Sep 2017 18:27:13 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sat, 30 Sep 2017 18:27:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=3J2wQrIdXufMyGVNK4F5pEOS8SkNlOYtt2RVXzLiYW8=; b=lCIrOsNe 7GV9hyAO5qImt+BhImq4z0Ba7trU1Cc7fn8nZzpscLFLrKpcX0kooIoJLmXpX/5B WnYB9GW7o2K6RdRra2ZKJvfZzhKnZEucMn/fzz2eo12NY0Z0WbaxkpATqMQ5/cex 2au659Pac6dOWfW0rh29nEG/jvyJ2U3dXc7jEcQGRfAV6gmpuL7OvSC2pBBf+jqS AtmMaIJ6lyJijyCPKELhy0ASV13eLdo9r1t0BT0MI11ZUpw1X0uITPUnvkfv602l esa/ZQ+jOGj9Evo91Ft0XyiR0PMS0AgfoRlumDl8sy//7v7bGTuikC+9mju4KBHo lH9yCjvKlHEOVQ== X-ME-Sender: X-Sasl-enc: HQbDcMipWvom8peLvRlLH5sgDf1Kki2oCsnSNVeAs1n/ 1506810433 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 517277E12B; Sat, 30 Sep 2017 18:27:13 -0400 (EDT) Date: Sat, 30 Sep 2017 15:27:12 -0700 From: Andres Freund To: Andrew Dunstan Cc: Tom Lane , pgsql-committers Subject: Re: pgsql: Add test for postmaster crash restarts. Message-ID: <20170930222712.xgdgxnt4sjvig5mn@alap3.anarazel.de> References: <8818AEBD-57F7-420D-8348-CDB426020BFE@anarazel.de> <17084.1505837634@sss.pgh.pa.us> <20170919164718.66hcedq2rtlkntvf@alap3.anarazel.de> <18695.1505840008@sss.pgh.pa.us> <20170919174232.soc2skrqxxdtnh22@alap3.anarazel.de> <21486.1506601297@sss.pgh.pa.us> <5ce9b1f4-dff8-6fe9-74ab-d8e1b993b1d5@2ndQuadrant.com> <20170930221043.iay4s7rmwm5l7wiw@alap3.anarazel.de> <56b65da3-f7cc-494c-7952-ba5f6c804d7e@2ndQuadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56b65da3-f7cc-494c-7952-ba5f6c804d7e@2ndQuadrant.com> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2017-09-30 18:21:33 -0400, Andrew Dunstan wrote: > > [re-adding commiters which I inadvertently left off] > > > On 09/30/2017 06:10 PM, Andres Freund wrote: > > > > > >> I was just looking at this. Why aren't we using "pg_ctl kill" to > >> terminate the backend? That's supposed to be portable. > > Because pg_ctl can't do that for any process but postmaster, no? The > > test is supposed to find issues with backend death (and has > > defficiencies in error reporting already, and would have caught a bug > > I'd introduced previously). > No, I don't think so. That's not what the docs say. That's why you give > it a pid argument" "pg_ctl kill signal_name process_id" Oh, cool. Didn't know that one. So the answer is: "Because Andres doesn't know squat.". But even after fixing that, there unfortunately is: static void set_sig(char *signame) { … #if 0 /* probably should NOT provide SIGKILL */ else if (strcmp(signame, "KILL") == 0) sig = SIGKILL; #endif I'm unclear on what that provision is achieving? If you can kill with pg_ctl you can do other nasty stuff too (like just use kill instead of pg_ctl)? Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers