Re: Pg 15 devel crashes when fetching data from table using cursor - Mailing list pgsql-bugs

From Andres Freund
Subject Re: Pg 15 devel crashes when fetching data from table using cursor
Date
Msg-id 20220311021047.hgtqkrl6n52srvdu@alap3.anarazel.de
Whole thread Raw
In response to Re: Pg 15 devel crashes when fetching data from table using cursor  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Pg 15 devel crashes when fetching data from table using cursor
List pgsql-bugs
Hi,

On 2022-03-10 21:05:37 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Another example of complete brokenness in the wider area is catalog accesses
> > happening after PROC_IN_VACUUM is set. Afaict it's entirely incorrect to do
> > any catalog accesses once set, because rows that are still needed for the
> > catalog access can just be removed.
> 
> That seems like a fairly untenable design rule.  Maybe we should rethink
> what PROC_IN_VACUUM means/is used for.

Isn't it something fairly fundamental? The goal of PROC_IN_VACUUM is to
prevent vacuum from holding up the "horizon" so other vacuums can remove rows
that have become dead after a long vacuum started.

I think we basically have to move the setting of PROC_IN_VACUUM to the last
moment, when we've done everything else, and then force a new snapshot to be
computed after.

Greetings,

Andres Freund



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Pg 15 devel crashes when fetching data from table using cursor
Next
From: Tom Lane
Date:
Subject: Re: Pg 15 devel crashes when fetching data from table using cursor