postgresql/src
Alvaro Herrera 3f19e176ae
Have CLUSTER ignore partitions not owned by caller
If a partitioned table has partitions owned by roles other than the
owner of the partitioned table, don't include them in the to-be-
clustered list.  This is similar to what VACUUM FULL does (except we do
it sooner, because there is no reason to postpone it).  Add a simple
test to verify that only owned partitions are clustered.

While at it, change memory context switch-and-back to occur once per
partition instead of outside of the loop.

Author: Justin Pryzby <pryzby@telsasoft.com>
Reviewed-by: Zhihong Yu <zyu@yugabyte.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/20220411140609.GF26620@telsasoft.com
2022-04-14 22:11:06 +02:00
..
backend Have CLUSTER ignore partitions not owned by caller 2022-04-14 22:11:06 +02:00
bin Fix case sensitivity in psql's tab completion for GUC names. 2022-04-13 16:26:34 -04:00
common Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
fe_utils Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
include Add missing spaces after single-line comments 2022-04-14 09:28:56 +12:00
interfaces Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
port Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
template Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
test Have CLUSTER ignore partitions not owned by caller 2022-04-14 22:11:06 +02:00
timezone Update copyright for 2022 2022-01-07 19:04:57 -05:00
tools Rename backup_compression.{c,h} to compression.{c,h} 2022-04-12 13:38:54 +09:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to CLDR 41 2022-04-06 08:17:33 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Improve frontend error logging style. 2022-04-08 14:55:14 -04:00