Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2TjV-0008Eq-Qv for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Apr 2017 02:28:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d2TjV-0006ne-DL for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Apr 2017 02:28:09 +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 1d2TjU-0006mL-3X for pgsql-hackers@postgresql.org; Mon, 24 Apr 2017 02:28:08 +0000 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d2TjN-0002EU-La for pgsql-hackers@postgresql.org; Mon, 24 Apr 2017 02:28:06 +0000 Received: by mail-wr0-x234.google.com with SMTP id l50so9340222wrc.3 for ; Sun, 23 Apr 2017 19:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=ReN8uNILNo1ISw7zBUEstGCMyuWScKXp8SYhwl5VcSc=; b=p1ikyax8eM+/EFPX1Ovpz0oR+f/xjzdQIoEFGAhBSI5GnJR4W5UIuWC3Also+/8hsd W6Jq3k2b1NPjYr8RGtHErBl7pQz2aKPxOCA/ba5JTayE2LXa5Xbb7wkkMa4+H0zBzD6Z kNJCuUG1FjuD0wEbofU2EdaXyr6ylqGTu2arihjMCZwocr0nOC5Ga7ipUpnOeUUfyM7t +IdAu9oGJchXUYqISUOBWG33pdhJ9vlIxO+H5814cRVRAjNWS3epuVqfKDvK41xBk7Gp KA7A3mTbygDgDtrFR2Z909UD4PcrAn1zJVsVnqEsVVy4daKIfsjSrPSBBHWAwYY5iRAT JGTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ReN8uNILNo1ISw7zBUEstGCMyuWScKXp8SYhwl5VcSc=; b=ibcI1DoMxap7egZhd+3epV14xrnpeLRYQgxyDYm4w9fa2q/2rEGhpoYghVfBovJCLm rjWVmDYSk6Vr4rEDiz385pxqvGZh/Upesyb4wlwMmzSah6EVCcktBFJOPrDIk9uY/ZN5 gOEfIp3WqLV60gHGkodzbKHUkwdfAt8e0NPJ+BZ6HFftw8HHzN6WYB9SK7z8li010lXs Y4lNsDsI+aUxAwZyfIEzDhzJME+8z4L1oQAhRTxTh1ZCcnfHdAwbry7WLYtvvw6ONYj+ PVMnL3E6tpE/lyMtLbjPpix3HdmUoP7MEvaNGwqgoY4GaObM1d7MfW3INzg/O6T1246N Zw3Q== X-Gm-Message-State: AN3rC/4EopEY3zXyDcCxleCpIzzrbeSB1mRuCdpMjCz/FHZDhS+5b/s3 +kuwYrAVxiikmEGeX3qHDw== X-Received: by 10.223.129.229 with SMTP id 92mr3781732wra.17.1493000880033; Sun, 23 Apr 2017 19:28:00 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id u206sm10889605wmg.20.2017.04.23.19.27.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Apr 2017 19:27:59 -0700 (PDT) Subject: Re: walsender & parallelism To: Andres Freund References: <20170421014030.fdzvvvbrz4nckrow@alap3.anarazel.de> <20170423234303.ljzdpcog2szyxbsm@alap3.anarazel.de> Cc: pgsql-hackers@postgresql.org, Petr Jelinek , Peter Eisentraut From: Petr Jelinek Message-ID: Date: Mon, 24 Apr 2017 04:27:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170423234303.ljzdpcog2szyxbsm@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 24/04/17 01:43, Andres Freund wrote: > >> BTW while looking at the code, I don't understand why we call >> latch_sigusr1_handler after calling SetLatch(MyLatch), shouldn't just >> the SetLatch be enough (they both end up calling sendSelfPipeByte() >> eventually)? > > Historic raisins - there didn't use to be a SetLatch in > procsignal_sigusr1_handler. That changed when I whacked around catchup & > notify to be based on latches ([1] and following). > > [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=59f71a0d0b56b2df48db4bf1738aece5551f7a47 > Okay, but why call both SetLatch and latch_sigusr1_handler? What does that buy us? -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, 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