Re: pgsql: Prevent instability in contrib/pageinspect's regression test. - Mailing list pgsql-hackers

From Greg Stark
Subject Re: pgsql: Prevent instability in contrib/pageinspect's regression test.
Date
Msg-id CAM-w4HPpL7-JG_jMyckf6K7OVko-ALOkx+SNWOxQ8o=+cmK3Aw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Prevent instability in contrib/pageinspect's regression test.  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Mon, 21 Nov 2022 at 15:01, Andres Freund <andres@anarazel.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



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Non-decimal integer literals
Next
From: Robert Haas
Date:
Subject: Re: fixing CREATEROLE