postgresql/src/include
Jeff Davis 2af07e2f74 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
2024-03-04 17:31:38 -08:00
..
access Remove unused ParallelWorkerInfo.pid field 2024-03-04 12:56:02 +02:00
archive Add macro for customizing an archiving WARNING message. 2024-03-04 15:41:42 -06:00
backup Update copyright for 2024 2024-01-03 20:49:05 -05:00
bootstrap Update copyright for 2024 2024-01-03 20:49:05 -05:00
catalog Explicitly list dependent types as extension members in pg_depend. 2024-03-04 14:49:36 -05:00
commands Improve performance of subsystems on top of SLRU 2024-02-28 17:05:31 +01:00
common Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
datatype Update copyright for 2024 2024-01-03 20:49:05 -05:00
executor Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
fe_utils Update copyright for 2024 2024-01-03 20:49:05 -05:00
foreign Update copyright for 2024 2024-01-03 20:49:05 -05:00
jit jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
lib Fix comments for the dshash_parameters struct. 2024-02-27 09:44:59 -06:00
libpq Remove unused 'countincludesself' argument to pq_sendcountedtext() 2024-03-04 12:56:05 +02:00
mb Simplify pg_enc2gettext_tbl[] with C99-designated initializer syntax 2024-03-01 18:03:48 +09:00
nodes Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
optimizer Add better handling of redundant IS [NOT] NULL quals 2024-01-23 18:09:18 +13:00
parser Add a const decoration 2024-01-25 13:34:49 +01:00
partitioning Update copyright for 2024 2024-01-03 20:49:05 -05:00
pch Update copyright for 2024 2024-01-03 20:49:05 -05:00
port Introduce atomic read/write functions with full barrier semantics. 2024-02-29 10:00:44 -06:00
portability Update copyright for 2024 2024-01-03 20:49:05 -05:00
postmaster Use MyBackendType in more places to check what process this is 2024-03-04 10:25:12 +02:00
regex Update copyright for 2024 2024-01-03 20:49:05 -05:00
replication Use MyBackendType in more places to check what process this is 2024-03-04 10:25:12 +02:00
rewrite Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
snowball Update copyright for 2024 2024-01-03 20:49:05 -05:00
statistics Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
tcop Update copyright for 2024 2024-01-03 20:49:05 -05:00
tsearch Update copyright for 2024 2024-01-03 20:49:05 -05:00
utils Fix search_path to a safe value during maintenance operations. 2024-03-04 17:31:38 -08:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Remove AIX support 2024-02-28 15:17:23 +04:00
fmgr.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
funcapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
getopt_long.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Fix makefiles for newly added files 2024-01-23 16:33:26 +01:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
miscadmin.h Use MyBackendType in more places to check what process this is 2024-03-04 10:25:12 +02:00
pg_config.h.in jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_getopt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_trace.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgtar.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgtime.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
port.h Replace calls to pg_qsort() with the qsort() macro. 2024-02-16 11:37:50 -06:00
postgres.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
varatt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
windowapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00