pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Prevent instability in contrib/pageinspect's regression test.
Date: Mon, 21 Nov 2022 11:56:28 -0800
Message-ID: <20221121195628.2rlqpbkjgjsvqn6w@alap3.anarazel.de> (raw)
In-Reply-To: <CA+TgmoaYMUv1ab2vAh7AoSUqUYHtPx9Cmehue2=JCXO3gvsDbw@mail.gmail.com>
References: <E1ox94a-000EHu-VH@gemulon.postgresql.org>
	<20221121172206.h6kywxrzqcmhoqom@awork3.anarazel.de>
	<3214376.1669051457@sss.pgh.pa.us>
	<3215927.1669052115@sss.pgh.pa.us>
	<CA+TgmoaYMUv1ab2vAh7AoSUqUYHtPx9Cmehue2=JCXO3gvsDbw@mail.gmail.com>

Hi,

On 2022-11-21 12:52:01 -0500, Robert Haas wrote:
> On Mon, Nov 21, 2022 at 12:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > I wrote:
> > > Andres Freund <andres@anarazel.de> writes:
> > >> Looks like a chunk of the buildfarm doesn't like this - presumably because
> > >> they use force_parallel_mode = regress. Seems ok to just force that to off in
> > >> this test?
> >
> > > Ugh ... didn't occur to me to try that.  I'll take a look.
> >
> > 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.

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.

It may be worth inventing a framework where a function could analyze its
arguments (presumably via prosupport) to determine the degree of
parallel safety, but this doesn't seem sufficient reason...

Greetings

Andres Freund





view thread (15+ messages)  latest in thread

Message-ID: <20221121195628.2rlqpbkjgjsvqn6w@alap3.anarazel.de>
Permalink:  ../20221121195628.2rlqpbkjgjsvqn6w@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20221121195628.2rlqpbkjgjsvqn6w@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Prevent instability in contrib/pageinspect's regression test.
  In-Reply-To: <20221121195628.2rlqpbkjgjsvqn6w@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox