diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-04-14 22:11:06 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-04-14 22:11:06 +0200 |
commit | 3f19e176ae0f55a653d62e1504dbe5ad8c1006a0 (patch) | |
tree | 2d8cd38e77dc359d0ce5d6df25afeb85c141c94f /src/backend/parser/parse_expr.c | |
parent | 275e719d910459db747346a51d56185e2440763b (diff) | |
download | postgresql-3f19e176ae0f55a653d62e1504dbe5ad8c1006a0.tar.gz postgresql-3f19e176ae0f55a653d62e1504dbe5ad8c1006a0.zip |
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
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions