Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dykoK-00059q-ER for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Oct 2017 20:26:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dykoJ-00089J-Ck for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Oct 2017 20:25:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dykmk-0005K6-0L for pgsql-hackers@postgresql.org; Sun, 01 Oct 2017 20:24:22 +0000 Received: from mail-yw0-x22a.google.com ([2607:f8b0:4002:c05::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dykmg-0007P1-Iw for pgsql-hackers@postgresql.org; Sun, 01 Oct 2017 20:24:20 +0000 Received: by mail-yw0-x22a.google.com with SMTP id i83so662283ywb.7 for ; Sun, 01 Oct 2017 13:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=diqunzHLy6d1vTzI7Zqot7ylYdTzRfiNXjvh++LG9qA=; b=simmj2qqKA8eP6HNVFIHSsMJ8AxPUSfxw7FmGPIBOofp4J9yUciiFqdQidgZ0CE0+q E9BMF/mZLbuDR/0mn3LymbcDmtuB2e4JnRmNEDmEyAngn04wM56ffJWDnMu4m6PKZ3yw hXWSjibdMd9XvNIHYFNj+uvjOH+74suw9wSSaghH2xQsCrJwOH980VtxBgd8G39ltAmn Nwz3QKQKYClGAZqdDyybxq6jUn4nBM7he9CT1ZAqjmu5BQ7q1I45Sl4fXh2zQoSbg7rE 2PQTElII0ar5Xt19D/226MqI6JqMnZagID9kq7ybwUa5gqRYXyrqmqDqhAINcwHJf1yC tS0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=diqunzHLy6d1vTzI7Zqot7ylYdTzRfiNXjvh++LG9qA=; b=YGs8LHldLkb/6T3pZA//fzMOWkfLB1UdP9nigv1/mW9bgFIpElqcS/FnZ+ucvfRXDA lrzvQsV8j6KJktXwzCzARE3XBb0ptzE2YGL3nJAWVghAxAgiT25ICGXt1MUgsB9Xof0j G/rBXc3j20n81UQmUknRtd6DJxppG6BFbOMjzsRDQxMl/Fx03Jz+vacW4M9je1mGqQ7Q bEEyErqmSl9UI5kHwqvQh3yXcRoUH4byVBsATamdDMw1sRp/5/zWKOu7W8vAEgcJA8tQ dkUCyE9bb0vnfk81ouxCTXdtjZHrKvBuj6xqGtn3Ft2KRe2+c61BzGkjZ5Ms1AQYf+7Q +lWw== X-Gm-Message-State: AHPjjUgp5doheCfUYTLkPFHgJB+y0pG+6K3/2ohSKFZFDIbs/vgQXTya TCYdAJVuH0/YMYwhQIExKYJK4ylFNyjDhOtSDzVdKXZK/rgp5QU+6MfiheVKfqaMUNud3ApHKdR A1VpUvdvtlmoGVJd2lfxbFLreY4b5oLbkdiOJGKSN/Fmd1JNcQFqyWJ/FYgbiYL26+F9q4r7P1k zyoF0NyTluVWzC X-Google-Smtp-Source: AOwi7QDUZPLmpSpdQVEKNhJ4H7egMC6/ZCmIa6sF4rnIOLhoGIdD8qBIv1sKtGzfp/WE47g1G3gLzw== X-Received: by 10.37.40.198 with SMTP id o189mr10976466ybo.285.1506889457188; Sun, 01 Oct 2017 13:24:17 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id x140sm3675970ywd.58.2017.10.01.13.24.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 13:24:16 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: pg_ctl kill support for KILL signal was Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts. To: Andres Freund Cc: Tom Lane , PostgreSQL-development References: <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> <20170930222712.xgdgxnt4sjvig5mn@alap3.anarazel.de> <20170930224424.ud5ilchmclbl5y5n@alap3.anarazel.de> <75777957-d16f-f799-d0ec-bc3d5b7c72de@2ndQuadrant.com> <20171001023214.zgw3gs7mxjmlkqcd@alap3.anarazel.de> Message-ID: <45d42d41-6145-9be1-7261-84acf6d9e344@2ndQuadrant.com> Date: Sun, 1 Oct 2017 16:24:15 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171001023214.zgw3gs7mxjmlkqcd@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-MW List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/30/2017 10:32 PM, Andres Freund wrote: > Hi, > > On 2017-09-30 22:28:39 -0400, Andrew Dunstan wrote: >>>> 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)? >> >> I put it in when we rewrote pg_ctl in C many years ago, possibly out of >> a superabundance of caution. I agree it's worth revisiting. I think the >> idea was that there's a difference between an ordinary footgun and an >> officially sanctioned footgun :-) > Heh. I'm inclined to take it out. We could add a --use-the-force-luke > type parameter, but it doesn't seem worth it. > > > I agree, but I think we need this discussed on -hackers. Does anyone have an objection to allowing "pg_ctl kill KILL somepid"? As Andres points out, in most places you can just call kill from the command line anyway, so disallowing it is not really a security feature. Having it would let us have portable crash restart tests. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers