Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkW8L-0007ld-Gu for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Apr 2022 19:18:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nkW8J-0002R9-Q2 for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Apr 2022 19:18:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkW8H-0002HT-So for pgsql-hackers@lists.postgresql.org; Fri, 29 Apr 2022 19:18:27 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkW8B-0002oG-05 for pgsql-hackers@postgresql.org; Fri, 29 Apr 2022 19:18:24 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4DC7A5C019B; Fri, 29 Apr 2022 15:18:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 29 Apr 2022 15:18:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1651259897; x=1651346297; bh=pJv0lbCn3X OyWnVf6/whPdXLlZ8UfKz9DILp8QYILlk=; b=Lm11k5IeHDPHcjNvbl7VzVohUd 7jAFjbX/wtQRgSGD/EPNX7WE+EoBGfvKjC8usW8hVosQibO9fPkQvtzJQJTaNIHR fTu1UAvEFri7AyaWSmqrmGiimejo8FVBFa3muarT5q00RTwRycxnf27PKMzld+kj wfwci434HH0wZefXhlJ1VyT5XqelQzaWOFzkV3mMvU0HzekCg5qUmSBoxH1IJJOO 2wq/mMtwiy3PMLCPUS9cDBqiWjRtzAg92Smz/Oz1+VshCXrL8ZXU0Lm5+Bs9g42R FHyaYALHcKctBspU+bcLFLkxeop2GbM10y6bwkN5DqiIHSq0bB1q2st1Fu3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1651259897; x= 1651346297; bh=pJv0lbCn3XOyWnVf6/whPdXLlZ8UfKz9DILp8QYILlk=; b=E dUwxjfAA0G3aQ5VONfEnk/3OnW9SDGnDojWqeMTEC3qioG+4iF6tjmfc3O/5QVr+ VuRkMSS7J0moRZtiQ+jmuoltac7ylWfa+mVTzSxGSr4FlJB4oVHorn/zR8EVEjhZ oeYqm8FXKIZglxAZNxRn7p5cDH5C2OWAjJVFhBNGC/HxfyIdxylFw798zaVpEhva U29qKJrOPM+1dCi0xgVphjnKCwQndyiT4Efb1KNKl7uezUn1bTrQ5RM4Zs4KJIWJ Ga/GJMUTpSGkDsYRB2j63wtyJ1INUmWYpjVFcebUJlGhq78T5BJMFamTk2zsAQ8J i1J+cmlDG0Zo7if90USdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudelgddufeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 29 Apr 2022 15:18:16 -0400 (EDT) Date: Fri, 29 Apr 2022 12:18:15 -0700 From: Andres Freund To: Fujii Masao Cc: Kyotaro Horiguchi , bharath.rupireddyforpostgres@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module Message-ID: <20220429191815.xewxjlpmq7mxhsr2@alap3.anarazel.de> References: <6b561c73-27ce-7079-b6e5-440e49653810@oss.nttdata.com> <20201216.162459.1543880840255001035.horikyota.ntt@gmail.com> <68571154-5bd5-dc00-1322-92bbf92de806@oss.nttdata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68571154-5bd5-dc00-1322-92bbf92de806@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2020-12-16 18:12:39 +0900, Fujii Masao wrote: > - /* Wait to be signaled by UnpinBuffer() */ > + /* > + * Wait to be signaled by UnpinBuffer(). > + * > + * We assume that only UnpinBuffer() and the timeout requests established > + * above can wake us up here. WakeupRecovery() called by walreceiver or > + * SIGHUP signal handler, etc cannot do that because it uses the different > + * latch from that ProcWaitForSignal() waits on. > + */ > ProcWaitForSignal(PG_WAIT_BUFFER_PIN); > > /* Isn't this comment bogus? The latch could e.g. be set by procsignal_sigusr1_handler(), which the startup process uses. Or it could already be set, when entering ResolveRecoveryConflictWithBufferPin(). Why is it even relevant that we only get woken up by UnpinBuffer()? Greetings, Andres Freund