Re: Pg 15 devel crashes when fetching data from table using cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, hubert depesz lubaczewski <depesz(at)depesz(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Pg 15 devel crashes when fetching data from table using cursor
Date: 2022-03-11 02:21:13
Message-ID: 763986.1646965273@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2022-03-11 02:36:43 Re: Pg 15 devel crashes when fetching data from table using cursor
Previous Message Andres Freund 2022-03-11 02:10:47 Re: Pg 15 devel crashes when fetching data from table using cursor