Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic
Date: 2021-06-10 17:07:36
Message-ID: CAH2-WznzamB7MK2QQpDGqaPwpg584sG2yrTQrmGTdB9BbQo+wQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 10, 2021 at 9:57 AM Matthias van de Meent
<boekewurm+postgres(at)gmail(dot)com> wrote:
> > By "matches what we expect", I meant "involves a just-aborted
> > transaction". We could defensively verify that the inserting
> > transaction concurrently aborted at the point of retrying/calling
> > heap_page_prune() a second time. If there is no aborted transaction
> > involved (as was the case with this bug), then we can be confident
> > that something is seriously broken.
>
> I believe there are more cases than only the rolled back case, but
> checking for those cases would potentially help, yes.

Why do you believe that there are other cases?

I'm not aware of any case that causes lazy_scan_prune() to retry using
the goto, other than the aborted transaction case I described
(excluding the bug that you diagnosed, which was of course never
supposed to happen). If it really is possible to observe a retry for
any other reason then I'd very much like to know all the details - it
might well signal a distinct bug of the same general variety.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-06-10 17:09:50 Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic
Previous Message Matthias van de Meent 2021-06-10 16:57:08 Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic