Re: pgsql: Fix search_path to a safe value during maintenance operations.
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Jeff Davis <jdavis@postgresql.org>, pgsql-committers@lists.postgresql.org
Date: 2023-06-10T00:37:57Z
Lists: pgsql-hackers
Attachments
- v1-0001-amcheck-mark-bt_index_check-PARALLEL-UNSAFE.patch (text/x-patch) patch v1-0001
On Fri, 2023-06-09 at 15:16 -0700, Jeff Davis wrote: > On Fri, 2023-06-09 at 20:54 +0000, Jeff Davis wrote: > > Fix search_path to a safe value during maintenance operations. > > Looks like this is causing pg_amcheck failures in the buildfarm. > Investigating... It looks related to bt_index_check_internal(), which is called by SQL functions bt_index_check() and bt_index_parent_check(). SQL functions can be called in parallel, so it raises the error: ERROR: cannot set parameters during a parallel operation because commit 05e1737351 added the SetConfigOption() line. Normally those functions would not be called in parallel, but debug_parallel_mode makes that happen. Attached a patch to mark those functions as PARALLEL UNSAFE, which fixes the problem. 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. -- Jeff Davis PostgreSQL Contributor Team - AWS
Commits
-
Fix search_path to a safe value during maintenance operations.
- 2af07e2f749a 17.0 landed
- 05e173735171 16.0 cited
-
Revert MAINTAIN privilege and pg_maintain predefined role.
- 957445996fda 16.0 landed
- 151c22deee66 17.0 landed
-
Add grantable MAINTAIN privilege and pg_maintain role.
- 60684dd834a2 16.0 cited
-
Revoke PUBLIC CREATE from public schema, now owned by pg_database_owner.
- b073c3ccd06e 15.0 cited