git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 2c29e7f) | patch
Fix search_path to a safe value during maintenance operations.
Tue, 5 Mar 2024 01:31:38 +0000 (17:31 -0800)
Tue, 5 Mar 2024 01:31:38 +0000 (17:31 -0800)
commit 2af07e2f749a9208ca1ed84fa1d8fe0e75833288
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/d4ccaf3658cb3c281ec88c851a09733cd9482f22.camel@j-davis.com
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
30 files changed:
contrib/amcheck/t/004_verify_nbtree_unique.pl diff | blob | blame | history
contrib/amcheck/verify_nbtree.c diff | blob | blame | history
doc/src/sgml/amcheck.sgml diff | blob | blame | history
doc/src/sgml/brin.sgml diff | blob | blame | history
doc/src/sgml/ref/analyze.sgml diff | blob | blame | history
doc/src/sgml/ref/cluster.sgml diff | blob | blame | history
doc/src/sgml/ref/create_index.sgml diff | blob | blame | history
doc/src/sgml/ref/refresh_materialized_view.sgml diff | blob | blame | history
doc/src/sgml/ref/reindex.sgml diff | blob | blame | history
doc/src/sgml/ref/vacuum.sgml diff | blob | blame | history
src/backend/access/brin/brin.c diff | blob | blame | history
src/backend/catalog/index.c diff | blob | blame | history
src/backend/catalog/namespace.c diff | blob | blame | history
src/backend/commands/analyze.c diff | blob | blame | history
src/backend/commands/cluster.c diff | blob | blame | history
src/backend/commands/indexcmds.c diff | blob | blame | history
src/backend/commands/matview.c diff | blob | blame | history
src/backend/commands/vacuum.c diff | blob | blame | history
src/bin/scripts/t/100_vacuumdb.pl diff | blob | blame | history
src/include/utils/guc.h diff | blob | blame | history
src/test/modules/test_oat_hooks/expected/alter_table.out diff | blob | blame | history
src/test/modules/test_oat_hooks/expected/test_oat_hooks.out diff | blob | blame | history
src/test/regress/expected/matview.out diff | blob | blame | history
src/test/regress/expected/namespace.out diff | blob | blame | history
src/test/regress/expected/privileges.out diff | blob | blame | history
src/test/regress/expected/vacuum.out diff | blob | blame | history
src/test/regress/sql/matview.sql diff | blob | blame | history
src/test/regress/sql/namespace.sql diff | blob | blame | history
src/test/regress/sql/privileges.sql diff | blob | blame | history
src/test/regress/sql/vacuum.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /