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 1mHEK7-0001n3-S2 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Aug 2021 23:53:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mHEJZ-0004lh-GM for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Aug 2021 23:52:45 +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 1mHEJZ-0004lY-8L for pgsql-hackers@lists.postgresql.org; Fri, 20 Aug 2021 23:52:45 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHEJS-0002UQ-Og for pgsql-hackers@postgresql.org; Fri, 20 Aug 2021 23:52:44 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A5F935C00B3; Fri, 20 Aug 2021 19:52:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 20 Aug 2021 19:52:37 -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:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=brfOHkEjw0sWFfo9BSn7h75M7JYNTLzDzWgxllNDGhc=; b=EAiIT4TF X9gIEbRy2S/x/1DSJXAasFgc1RPbDHLY27IQFaCLPYQHOChtt82mqApUHGrHo2OV Fc/SY5iK9LtYkfeUSjX1Wnh2G/muGVirUhnsog01antt6/7p4itoPFptLBxinPud fAMr5vqiHg7jZU4KkfCr+G4GMXODVpck9CZo9u6rA4PJ8uGebc4EHaPghcfPDlCl C6GNLZIKLuVAdDOqIStLFqC5nMcEBZxCT3vBjw7QdzgV5Q4WIR1AnrHJl5ofpCX3 3lKx3PBRTGSMz3YkRXQvzvzRoPzdfVBk08zA4Ie5EctIIXytq3rHcI87S1qtTsNj jQH4b3F+ezLPNw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddttddgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpedfrghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdfuceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhephfdufedthfelveegjedtffdu leekiedugfdtgfdttdevteejleetgefhueeigfetnecuffhomhgrihhnpegvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Aug 2021 19:52:35 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2A3162A099A; Fri, 20 Aug 2021 19:52:33 -0400 (-04) Date: Fri, 20 Aug 2021 19:52:33 -0400 From: "alvherre@alvh.no-ip.org" To: "Bossart, Nathan" Cc: Robert Haas , Kyotaro Horiguchi , "x4mmm@yandex-team.ru" , "a.lubennikova@postgrespro.ru" , "hlinnaka@iki.fi" , "matsumura.ryo@fujitsu.com" , "masao.fujii@gmail.com" , "pgsql-hackers@postgresql.org" Subject: Re: archive status ".ready" files may be created too early Message-ID: <202108202352.2tp2o5zgvrsl@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Aug-20, Bossart, Nathan wrote: > I was looking at moving the function calls out of the spinlock region. > I don't think the functions are doing anything too expensive, and they > help clean up NotifySegmentsReadyForArchive() quite a bit, but I > understand why it might be against project policy to do something like > that. It would be easy enough to get rid of the helper functions if > that was concern. Well, the thing I realized is that these three helper functions have exactly one caller each. I think the compiler is going to inline them, so there isn't going to be a function call in the assembly. I haven't verified this, though. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Los dioses no protegen a los insensatos. Éstos reciben protección de otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)