From: Jeff Davis <pgsql@j-davis.com>
To: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.
Date: Fri, 09 Jun 2023 17:49:00 -0700
Message-ID: <053b43a9f80793a8f31467ba9de3db90518ab120.camel@j-davis.com> (raw)
In-Reply-To: <d20864b929ff769a0ebf772359719f05bb6982cd.camel@j-davis.com>
References: <E1q7j7Y-000z1H-Hr@gemulon.postgresql.org>
<89a415b86d5421941e4281ba5bf6288934078624.camel@j-davis.com>
<d20864b929ff769a0ebf772359719f05bb6982cd.camel@j-davis.com>
On Fri, 2023-06-09 at 17:37 -0700, Jeff Davis wrote:
> Attached a patch to mark those functions as PARALLEL UNSAFE, which
> fixes the problem.
On second thought, that might not be acceptable for amcheck, depending
on how its run.
I think it's OK if run by pg_amcheck, because that runs it on a single
index at a time in each connection, and parallelizes by opening more
connections.
But if some users are calling the check functions across many tables in
a single select statement (e.g. in the targetlist of a query on
pg_class), then they'll experience a regression.
> Alternatively, I could just take out that line, as those SQL
> functions
> are not controlled by the MAINTAIN privilege. But for consistency I
> think it's a good idea to leave it in so that index functions are
> called with the right search path for amcheck.
If marking them PARALLEL UNSAFE is not acceptable, then this seems like
a fine solution.
Regards,
Jeff Davis
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: pgsql@j-davis.com, jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.
In-Reply-To: <053b43a9f80793a8f31467ba9de3db90518ab120.camel@j-davis.com>
* 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