Re: Assert while autovacuum was executing - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Assert while autovacuum was executing
Date
Msg-id CAH2-WzmRmi7KVerZM6K-Q2OavDvHs-iDzCGPBQve_hi9XJXm0Q@mail.gmail.com
Whole thread Raw
In response to Assert while autovacuum was executing  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Responses Re: Assert while autovacuum was executing
List pgsql-hackers
On Sat, Jun 17, 2023 at 11:29 AM Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> I have been testing 16beta1, last commit
> a14e75eb0b6a73821e0d66c0d407372ec8376105
> I just let sqlsmith do its magic before trying something else, and
> today I found a core with the attached backtrace.

The assertion that fails is the IsPageLockHeld assertion from commit 72e78d831a.

I think that this is kind of an odd assertion. It's also not justified
by any comments. Why invent this rule at all?

To be fair the use of page heavyweight locks in ginInsertCleanup() is
also odd. The only reason why ginInsertCleanup() uses page-level locks
here is to get the benefit of deadlock detection, and to be able to
hold the lock for a relatively long time if that proves necessary
(i.e., interruptibility). There are reasons to doubt that that's a
good design, but either way it seems fundamentally incompatible with
the rule enforced by the assertion.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Assert while autovacuum was executing
Next
From: Tomas Vondra
Date:
Subject: Re: [PATCH] ltree hash functions