public inbox for [email protected]  
help / color / mirror / Atom feed
From: Sven Klemm <[email protected]>
To: Matthias van de Meent <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] Improve error message when trying to lock virtual tuple.
Date: Tue, 18 Jun 2024 09:32:30 +0200
Message-ID: <CAMCrgp2HmFLsw9EsVKJ4Rfsq8HX_mjZCqipzU3zEGCFippC6pQ@mail.gmail.com> (raw)
In-Reply-To: <CAEze2WivuhGMdEZD4X_1eF6AE=XrJh2vQAB=go69kNJPcMoSfw@mail.gmail.com>
References: <CAMCrgp0TBCOWneX6oPpysR3gqp_njgNvBOd45wtpiwMjuoFeMQ@mail.gmail.com>
	<CAEze2WivuhGMdEZD4X_1eF6AE=XrJh2vQAB=go69kNJPcMoSfw@mail.gmail.com>

On Mon, Jun 17, 2024 at 10:25 PM Matthias van de Meent
<[email protected]> wrote:

> I think you're solving the wrong problem here, as I can't think of a
> place where both virtual tuple slots and tuple locking are allowed at
> the same time in core code.
>
> I mean, in which kind of situation could we get a Relation's table
> slot which is not lockable by said relation's AM? Assuming the "could
> not read block 0" error comes from the heap code, why does the
> assertion in heapam_tuple_lock that checks for a
> BufferHeapTupleTableSlot not fire before this `block 0` error? If the
> error is not in the heapam code, could you show an example of the code
> that breaks with that error code?

In assertion enabled builds this will be stopped much earlier and not return
the misleading error message. But most packaged postgres versions don't have
assertions enabled and will produce the misleading `could not read block 0`
error.
I am aware that this not a postgres bug, but i think this error message
is an improvement over the current situation.


-- 
Regards, Sven Klemm






view thread (4+ messages)  latest in thread

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]
  Subject: Re: [PATCH] Improve error message when trying to lock virtual tuple.
  In-Reply-To: <CAMCrgp2HmFLsw9EsVKJ4Rfsq8HX_mjZCqipzU3zEGCFippC6pQ@mail.gmail.com>

* 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