Have CLUSTER ignore partitions not owned by caller
Alvaro Herrera <alvherre@alvh.no-ip.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/cluster.c | modified | +12 −7 |
| src/test/regress/expected/cluster.out | modified | +25 −0 |
| src/test/regress/sql/cluster.sql | modified | +19 −0 |
Discussion
- CLUSTER on partitioned index 37 messages · 2020-10-28 → 2022-04-26