Re: pgsql: Prevent instability in contrib/pageinspect's regression test.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2022-11-21T18:08:58Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Nov 21, 2022 at 12:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hmm, so the problem is:
>> 
>> SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
>> ERROR:  cannot access temporary tables during a parallel operation
>> 
>> Why in the world is get_raw_page() marked as parallel safe?
>> It clearly isn't, given this restriction.

> I suspect that restriction was overlooked when evaluating the marking
> of this function.

So it would seem.  PARALLEL RESTRICTED should work, though.

I'll check to see if any sibling functions have the same issue,
and push a patch to adjust them.

Presumably the parallel labeling has to be fixed as far back as
it's marked that way (didn't look).  Maybe we should push the
test change further back too, just to exercise this.

			regards, tom lane



Commits

  1. Mark pageinspect's disk-accessing functions as parallel restricted.

  2. Prevent instability in contrib/pageinspect's regression test.

  3. Set cutoff xmin more aggressively when vacuuming a temporary table.