pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Faulty HEAP_XMAX_LOCK_ONLY & HEAP_KEYS_UPDATED hintbit combination
Date: Sun, 24 Jan 2021 13:01:33 -0300
Message-ID: <20210124160133.GA32557@alvherre.pgsql> (raw)
In-Reply-To: <20210124061758.GA11756@nol>

On 2021-Jan-24, Julien Rouhaud wrote:

> +	/*
> +	 * Do not allow tuples with invalid combinations of hint bits to be placed
> +	 * on a page.  These combinations are detected as corruption by the
> +	 * contrib/amcheck logic, so if you disable one or both of these
> +	 * assertions, make corresponding changes there.
> +	 */
> +	Assert(!((tuple->t_data->t_infomask & HEAP_XMAX_LOCK_ONLY) &&
> +			 (tuple->t_data->t_infomask2 & HEAP_KEYS_UPDATED)));
> 
> 
> I attach a simple self contained script to reproduce the problem, the last
> UPDATE triggering the Assert.
> 
> I'm not really familiar with this part of the code, so it's not exactly clear
> to me if some logic is missing in compute_new_xmax_infomask() /
> heap_prepare_insert(), or if this should actually be an allowed combination of
> hint bit.

Hmm, it's probably a bug in compute_new_xmax_infomask.  I don't think
the combination is sensible.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"There is evil in the world. There are dark, awful things. Occasionally, we get
a glimpse of them. But there are dark corners; horrors almost impossible to
imagine... even in our worst nightmares." (Van Helsing, Dracula A.D. 1972)





view thread (17+ messages)  latest in thread

Message-ID: <20210124160133.GA32557@alvherre.pgsql>
Permalink:  ../20210124160133.GA32557@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210124160133.GA32557@alvherre.pgsql

 · 

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: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, rjuju123@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Faulty HEAP_XMAX_LOCK_ONLY & HEAP_KEYS_UPDATED hintbit combination
  In-Reply-To: <20210124160133.GA32557@alvherre.pgsql>

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

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