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

From: Greg Stark <stark(at)mit(dot)edu>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Prevent instability in contrib/pageinspect's regression test.
Date: 2022-11-23 16:58:41
Message-ID: CAM-w4HPpL7-JG_jMyckf6K7OVko-ALOkx+SNWOxQ8o=+cmK3Aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, 21 Nov 2022 at 15:01, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> It's somewhat sad to add this restriction - I've used get_raw_page() (+
> other functions) to scan a whole database for a bug. IIRC that actually
> did end up using parallelism, albeit likely not very efficiently.
>
> Don't really have a better idea though.

Given how specific the use case is here a simple solution would be to
just have a dedicated get_raw_temp_page() and restrict get_raw_page()
to persistent tables.

I suppose slightly gilding it would be to make a get_raw_page_temp()
and get_raw_page_persistent() and then you could have get_raw_page()
call the appropropriate one. They would be parallel restricted except
for get_raw_page_persistent() and if you explicitly called it you
could get parallel scans otherwise you wouldn't.

--
greg

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2022-11-23 18:50:31 pgsql: Don't test HEAP_XMAX_INVALID when freezing xmax.
Previous Message Andrew Dunstan 2022-11-23 12:18:50 pgsql: Fix perl warning from commit 9b4eafcaf4

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-11-23 17:01:10 Re: fixing CREATEROLE
Previous Message Dean Rasheed 2022-11-23 16:25:50 Re: Non-decimal integer literals