diff options
author | Jeff Davis | 2024-03-05 03:42:16 +0000 |
---|---|---|
committer | Jeff Davis | 2024-03-05 03:42:16 +0000 |
commit | 59825d16399699e2f99016b9add46cb2d4916f82 (patch) | |
tree | ea8d60b32711b06de70773059bbc3a70d5d76e00 /src/backend/catalog/index.c | |
parent | a37a3e2b36d7de965f974b8caca0c295833708f2 (diff) |
Fix buildfarm failures from 2af07e2f74.
Use GUC_ACTION_SAVE rather than GUC_ACTION_SET, necessary for working
with parallel query.
Now that the call requires more arguments, wrap the call in a new
function to avoid code duplication and offer a place for a comment.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/catalog/index.c')
-rw-r--r-- | src/backend/catalog/index.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 1813b73a4fa..e6140853c05 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -1464,8 +1464,7 @@ index_concurrently_build(Oid heapRelationId, SetUserIdAndSecContext(heapRel->rd_rel->relowner, save_sec_context | SECURITY_RESTRICTED_OPERATION); save_nestlevel = NewGUCNestLevel(); - SetConfigOption("search_path", GUC_SAFE_SEARCH_PATH, PGC_USERSET, - PGC_S_SESSION); + RestrictSearchPath(); indexRelation = index_open(indexRelationId, RowExclusiveLock); @@ -3018,9 +3017,7 @@ index_build(Relation heapRelation, SetUserIdAndSecContext(heapRelation->rd_rel->relowner, save_sec_context | SECURITY_RESTRICTED_OPERATION); save_nestlevel = NewGUCNestLevel(); - if (!IsBootstrapProcessingMode()) - SetConfigOption("search_path", GUC_SAFE_SEARCH_PATH, PGC_USERSET, - PGC_S_SESSION); + RestrictSearchPath(); /* Set up initial progress report status */ { @@ -3356,8 +3353,7 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot) SetUserIdAndSecContext(heapRelation->rd_rel->relowner, save_sec_context | SECURITY_RESTRICTED_OPERATION); save_nestlevel = NewGUCNestLevel(); - SetConfigOption("search_path", GUC_SAFE_SEARCH_PATH, PGC_USERSET, - PGC_S_SESSION); + RestrictSearchPath(); indexRelation = index_open(indexId, RowExclusiveLock); @@ -3619,8 +3615,7 @@ reindex_index(const ReindexStmt *stmt, Oid indexId, SetUserIdAndSecContext(heapRelation->rd_rel->relowner, save_sec_context | SECURITY_RESTRICTED_OPERATION); save_nestlevel = NewGUCNestLevel(); - SetConfigOption("search_path", GUC_SAFE_SEARCH_PATH, PGC_USERSET, - PGC_S_SESSION); + RestrictSearchPath(); if (progress) { |