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 1pkaW9-0004Y2-Np for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Apr 2023 01:03:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkaW8-0000ru-M6 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Apr 2023 01:03:52 +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 1pkaW8-0000rl-Ci for pgsql-hackers@lists.postgresql.org; Fri, 07 Apr 2023 01:03:52 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkaW5-000709-Sh for pgsql-hackers@postgresql.org; Fri, 07 Apr 2023 01:03:51 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id F06A7320089C; Thu, 6 Apr 2023 21:03:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 06 Apr 2023 21:03:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type: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=fm2; t=1680829426; x=1680915826; bh=l+ cPJKiskhaS6nnHSbgK4Hk1sOxwabBXvwzRVEOwLHc=; b=YStR/pi++PIGYXMd6s Xp9NN3nVQWBwRB1fiHdblDO+TrBHewXwJ3dAvxYDA9S9cni3x+XzkhR1a6vICibS VW5p9L7LTlnzr8p5RsCaOeeqE9aL4EWja4/Ewp6Kw1XB69arfESJ44bDC1gKA8Bb hWYFldLQrDMONbGbK/I1K0iT4E7zcKQ6+jY3Ut4wQD0aZVhmoDj3PiAHovk9FjxH izts7wfpsVuxX7eMTydqfGxXoZoPLSxkePtNJsSWhNQLshhKGHGrFOGjQInARkxf uKWDNXv0hijDegOcfQhlDcdwkA6dk27eKkXLA+mS5H+KmP6wO2vQgp1L+LxkLeOj U+sQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id: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=fm2; t=1680829426; x=1680915826; bh=l+cPJKiskhaS6 nnHSbgK4Hk1sOxwabBXvwzRVEOwLHc=; b=D88Yf3suw/ZLILhVR4+TAtFjwbycy qNuDHME5FqIwiA0tjBEi5r7dM+eX3mIEJDzEbGeDzRnDfnaMypVBloXc3v62Mgra MyUS+lsWNj9XLrlmzYFELsWGZTURIaJiEBxK2j8qpevTZoHQSAeorG9rqbrODN/4 Bb5R68XbyNiK/8k87+EtiXU8hWQV+2ULoj4CgTPiDdpaceBM3OmzUx3R8kAGni1H DEOxedslgNt51+3c/hGVozIk8UErTllYtuU7eB4oMxw+Fop8NL3bb1HD/eSXpg7V EB9wJ2WOC+3bwzTsG9IsBPQX9/tJ1AQVthO7PYDWrpRUfEbxGkEOY2LtQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 21:03:46 -0400 (EDT) Date: Thu, 6 Apr 2023 18:03:44 -0700 From: Andres Freund To: Tomas Vondra Cc: Tom Lane , pgsql-hackers@postgresql.org, Tomas Vondra , Anastasia Lubennikova , Pavan Deolasee , Jeff Janes Subject: Re: hio.c does visibilitymap_pin()/IO while holding buffer lock Message-ID: <20230407010344.2b2owzwqmtmdrjij@awork3.anarazel.de> References: <20230325025740.wzvchp2kromw4zqz@awork3.anarazel.de> <0c11032a-d91b-8875-ab7b-4554776390c5@enterprisedb.com> <20230325163903.eu67kqcqo4llhc4u@awork3.anarazel.de> <2602455.1679763437@sss.pgh.pa.us> <20230325181707.at3kwsh7uvkhfype@awork3.anarazel.de> <20230329012102.zpviu2e7kyfrovxn@awork3.anarazel.de> <20230329021721.l3rujmv3jjmktt5i@awork3.anarazel.de> <20230402224024.aealekgu2df4cnhs@awork3.anarazel.de> <20230403190030.fk2frxv6faklrseb@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230403190030.fk2frxv6faklrseb@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-04-03 12:00:30 -0700, Andres Freund wrote: > It's not great, I agree. I tried to make it easier to read in this version by > a) changing GetVisibilityMapPins() as I proposed > b) added a new variable "recheckVmPins", that gets set in > if (unlockedTargetBuffer) > and > if (otherBuffer != InvalidBuffer) > c) reformulated comments I pushed this version a couple hours ago, after a bit more polishing. Greetings, Andres Freund