On Mon, 2023-06-19 at 14:55 -0700, Nathan Bossart wrote: > I'm hoping to commit 0002 and 0003 by the end of the week so > that these fixes are available in 16beta2.
A few observations for the case where a user does have the MAINTAIN privilege on a partitioned table but not the partitions: * they can LOCK TABLE on the partitioned table * ANALYZE works on the inheritance tree but not the individual partitions * CLUSTER and VACUUM are useless because they skip all of the partitions. That's consistent with the purpose of this thread -- to avoid the locking problems trying to support those operations on partitioned tables. * REINDEX TABLE applies to all indexes in all partitions, which seems a bit inconsistent. The only behavior I'm worried about is REINDEX. I'm not sure what we should do about it, or if we even want to do something about it. If we want REINDEX to fail in this case, we should be sure to check permissions on everything up-front to avoid doing a lot of work. The only other option I can think of is to REINDEX only those indexes declared on the partitioned table (not the individual partitions), which seems consistent but might be confusing to users. Regards, Jeff Davis