Re: BUG #17741: vacuum process hangs after pg_surgery manipulations

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: a(dot)kozhemyakin(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17741: vacuum process hangs after pg_surgery manipulations
Date: 2023-01-29 19:24:21
Message-ID: 20230129192421.pox3vbwqfscacdiu@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2023-Jan-18, Masahiko Sawada wrote:

> While this is completely true and I agree, can we improve this
> situation somewhat so that it ends up with an error instead of getting
> hanged?

Well, I don't know. I think in this case we would have to look at a
patch that claimed to change the behavior, so that we can determine
whether it's likely to break something else.

> In this case, the tuple with a = 1, the root of the HOT chain, was
> killed, and the tuple with a = 2 was heap-only tuple and HOT-updated.
> In heap_page_prune(), we normally can prune the tuple with a = 2 as
> part of pruning its chain, but since the root tuple was already killed
> we could not prune this tuple. Then, we ended up retrying
> heap_page_prune() since we saw as if the tuple became dead since
> heap_page_prune() looked.

My intuition for attacking this, is that we should definitely strive to
change the behavior if the pattern of corruption is something that is
seen to appear with some frequency. If it only happens because somebody
was careless while running pg_surgery, then let's just leave it to her
to complete the surgery. But if some unknown server bug causes it and
we have a lot of people with vacuum hanging because of it, then I agree
with might want to look for alternatives.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kosio Dimitrov 2023-01-30 08:11:26 Re: BUG #17761: Questionable regular expression behavior
Previous Message Tom Lane 2023-01-27 16:04:53 Re: BUG #17761: Questionable regular expression behavior