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 1pg7Cq-000495-KP for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2023 16:57:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pg7Cp-00065x-GV for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2023 16:57: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 1pg7Cp-00065n-6o for pgsql-hackers@lists.postgresql.org; Sat, 25 Mar 2023 16:57:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pg7Cm-0001F2-Qm for pgsql-hackers@postgresql.org; Sat, 25 Mar 2023 16:57:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32PGvHQY2602456; Sat, 25 Mar 2023 12:57:17 -0400 From: Tom Lane To: Andres Freund cc: Tomas Vondra , pgsql-hackers@postgresql.org, Tomas Vondra , Anastasia Lubennikova , Pavan Deolasee , Jeff Janes Subject: Re: hio.c does visibilitymap_pin()/IO while holding buffer lock In-reply-to: <20230325163903.eu67kqcqo4llhc4u@awork3.anarazel.de> References: <20230325025740.wzvchp2kromw4zqz@awork3.anarazel.de> <0c11032a-d91b-8875-ab7b-4554776390c5@enterprisedb.com> <20230325163903.eu67kqcqo4llhc4u@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 25 Mar 2023 09:39:03 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2602454.1679763437.1@sss.pgh.pa.us> Date: Sat, 25 Mar 2023 12:57:17 -0400 Message-ID: <2602455.1679763437@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2023-03-25 14:34:25 +0100, Tomas Vondra wrote: >> Can't we ensure we actually lock the vm buffer too in ReadBufferBI, >> before calling ReadBufferExtended? Or am I confused and that's not >> possible for some reason? > Note that this is using P_NEW. I.e. we don't know the buffer location yet. Maybe the relation-extension logic needs to include the ability to get the relevant vm page? regards, tom lane