public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Tomas Vondra <[email protected]>
Cc: [email protected]
Cc: Tomas Vondra <[email protected]>
Cc: Anastasia Lubennikova <[email protected]>
Cc: Pavan Deolasee <[email protected]>
Cc: Jeff Janes <[email protected]>
Subject: Re: hio.c does visibilitymap_pin()/IO while holding buffer lock
Date: Sat, 25 Mar 2023 09:39:03 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Hi,

On 2023-03-25 14:34:25 +0100, Tomas Vondra wrote:
> On 3/25/23 03:57, Andres Freund wrote:
> > 2) Change relevant code so that we only return a valid vmbuffer if we could do
> >    so without blocking / IO and, obviously, skip updating the VM if we
> >    couldn't get the buffer.
> > 
> 
> I don't recall the exact details about the vm locking/pinning, but can't
> we just ensure we actually follow the proper locking order? I mean, this
> only deals with new pages, requested at line ~624:
> 
>   buffer = ReadBufferBI(relation, P_NEW, RBM_ZERO_AND_LOCK, bistate);
> 
> 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.

Greetings,

Andres Freund






view thread (4+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: hio.c does visibilitymap_pin()/IO while holding buffer lock
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox