From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: a.kozhemyakin@postgrespro.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17741: vacuum process hangs after pg_surgery manipulations
Date: Sun, 29 Jan 2023 20:24:21 +0100
Message-ID: <20230129192421.pox3vbwqfscacdiu@alvherre.pgsql> (raw)
In-Reply-To: <CAD21AoBYvTfc9E+3p6ecN2n=UsftggWaQiZo1xtYnObQ-uTiQQ@mail.gmail.com>
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/
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-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, sawada.mshk@gmail.com, a.kozhemyakin@postgrespro.ru, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17741: vacuum process hangs after pg_surgery manipulations
In-Reply-To: <20230129192421.pox3vbwqfscacdiu@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