diff options
author | Jeff Davis | 2024-03-05 01:31:38 +0000 |
---|---|---|
committer | Jeff Davis | 2024-03-05 01:31:38 +0000 |
commit | 2af07e2f749a9208ca1ed84fa1d8fe0e75833288 (patch) | |
tree | 94ba59cc859b1f22dbd0ee85b9062e757f50d65e /doc/src/sgml/ref/vacuum.sgml | |
parent | 2c29e7fc95b24f5ccfec0d2db458d2130606f446 (diff) |
Fix search_path to a safe value during maintenance operations.
While executing maintenance operations (ANALYZE, CLUSTER, REFRESH
MATERIALIZED VIEW, REINDEX, or VACUUM), set search_path to
'pg_catalog, pg_temp' to prevent inconsistent behavior.
Functions that are used for functional indexes, in index expressions,
or in materialized views and depend on a different search path must be
declared with CREATE FUNCTION ... SET search_path='...'.
This change was previously committed as 05e1737351, then reverted in
commit 2fcc7ee7af because it was too late in the cycle.
Preparation for the MAINTAIN privilege, which was previously reverted
due to search_path manipulation hazards.
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/E1q7j7Y-000z1H-Hr%40gemulon.postgresql.org
Discussion: https://postgr.es/m/e44327179e5c9015c8dda67351c04da552066017.camel%40j-davis.com
Reviewed-by: Greg Stark, Nathan Bossart, Noah Misch
Diffstat (limited to 'doc/src/sgml/ref/vacuum.sgml')
-rw-r--r-- | doc/src/sgml/ref/vacuum.sgml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index a87c2e320e2..df0dd71a370 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -444,6 +444,12 @@ VACUUM [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] [ <re </para> <para> + While <command>VACUUM</command> is running, the <xref + linkend="guc-search-path"/> is temporarily changed to <literal>pg_catalog, + pg_temp</literal>. + </para> + + <para> <command>VACUUM</command> cannot be executed inside a transaction block. </para> |