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

From Tom Lane
Subject Re: Pg 15 devel crashes when fetching data from table using cursor
Date
Msg-id 763986.1646965273@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pg 15 devel crashes when fetching data from table using cursor  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> 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.

Maybe we can add Assert(!PROC_IN_VACUUM) to catalog accesses?

But the main reason I'm concerned about this is that I fear people
will unthinkingly put catalog accesses into error paths, where
they might well not get exercised by any normal testing.
The poster child for this is something like

    if (unlikely-condition)
        elog(ERROR, "Houston, we have a problem with table %s",
             get_rel_name(relid));

Assertions are unlikely to help us catch that.

            regards, tom lane



pgsql-bugs by date:

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