Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyU0G-00074u-Mw for pgsql-committers@arkaria.postgresql.org; Sun, 01 Oct 2017 02:29:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dyU0F-0007jC-AM for pgsql-committers@arkaria.postgresql.org; Sun, 01 Oct 2017 02:29:11 +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 1dyTzz-0007Ix-7z for pgsql-committers@postgresql.org; Sun, 01 Oct 2017 02:28:55 +0000 Received: from mail-yw0-x234.google.com ([2607:f8b0:4002:c05::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dyTzo-0007FF-98 for pgsql-committers@postgresql.org; Sun, 01 Oct 2017 02:28:51 +0000 Received: by mail-yw0-x234.google.com with SMTP id p10so1862790ywh.8 for ; Sat, 30 Sep 2017 19:28:43 -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=ZDEC729aeCCWpZ/c5OkM96qm0VGgyhvi7PJDBdFe63E=; b=SUnQF6o3hP2daYxHeCO7BpjFkqhIhQAv02KPGDqx6/6HABB91BVGFDU/VAM5zv4igV Ua6847y1oi7DW6mGCdT4nihMrlfdSs+itJmrolbucL4ANsCxSPuuniq1jaRYU3F9x7jL 5ni5+KC0tzFx2VJWpwdPREWhrM3nSXU/Lc9mEiM7N4M6ckJzMbJLnyJcIlEhzLTu/+NT j2Yz+zM/2NI5lwW/E0MtK2jkg01lKuyfH6Yep+h7K+zzORzJO+nfbsX728f11Oo5QNGJ iNxlBho/EErdVqxR7PyRXBfTX9Lz0QTWGJjixqHGK/iA7TIra7Lz/aKHtgvassJs8+K/ 7NIg== 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=ZDEC729aeCCWpZ/c5OkM96qm0VGgyhvi7PJDBdFe63E=; b=EfWzbG1TCC29D8T56m5L/L9z8uESMqhvIZwzxuN2RBCnB2aztYNHoV29+LtAsMKLTa iGY8BfTF7EIkZ/misJjOVG5JClUNRTTKZqyWkIg6tANuN/E4vrjVbLEJhV/UCYpmeBHc qeRsSFM+3pUFwSZwGAOA5Um+fTMAJrWRHiSCmz4wQMc9zg+KdW0IyAg3rzM14z7n3cmc MFreu4qihbhrGmUenxYCL0TDaiQX+CfbboStF1eSSc6h3mbaWbJ1dKygygGXwK/t6qUZ cSN5EuF1SQGTBoj8+12dvzlnlWxEeS5hkvo6hB7U8vPPBiGcv34aUJ+35obEcW+jnEiY o/3w== X-Gm-Message-State: AHPjjUjvkkqCrtI+wTU9Shi0LLtCFHMBCbWiNbje97hdQbpPHkmD6dLw McX8xcMFyMn5ttlvm7oulG+pOjT01bAFtsjIg9b/0naf7nujJ3W58i9KvddF6ccRES22gRAZ1pL khSiZ7O6qt3BpZ+bmY3LDzxgogEedNRQW4jKZKtGxcQxepN3nG6YEcUqWkaND5oR/yI/c1IMtQo g8FcapANG2s7Khtt9i X-Google-Smtp-Source: AOwi7QDCUD00RIkiLWrbLUC2x2WzAyt5sYhMb4BFz8I99y6fObNg9kg+83JPHZbtgvoPt8j2O3Uyow== X-Received: by 10.37.59.145 with SMTP id i139mr9952702yba.229.1506824921364; Sat, 30 Sep 2017 19:28:41 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id x23sm3350186ywx.104.2017.09.30.19.28.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Sep 2017 19:28:40 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Add test for postmaster crash restarts. To: Andres Freund Cc: Tom Lane , pgsql-committers References: <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> <20170930222712.xgdgxnt4sjvig5mn@alap3.anarazel.de> <20170930224424.ud5ilchmclbl5y5n@alap3.anarazel.de> Message-ID: <75777957-d16f-f799-d0ec-bc3d5b7c72de@2ndQuadrant.com> Date: Sat, 30 Sep 2017 22:28:39 -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: <20170930224424.ud5ilchmclbl5y5n@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252 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-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 09/30/2017 06:44 PM, Andres Freund wrote: > On 2017-09-30 15:27:12 -0700, Andres Freund wrote: >> 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)? 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 :-) > Could you perhaps test whether windows likes things after the following > patch? I don't think the kill_kill guarantees are really needed here, > so we might even be able to allow this on msvc. > Haven't tested on MSVC but with this patch it passes on jacana (mingw). cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers