Re: tablecmds: reject CLUSTER ON for partitioned tables earlier
Zsolt Parragi <zsolt.parragi@percona.com>
From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Chao Li <li.evan.chao@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-01-27T08:41:09Z
Lists: pgsql-hackers
> can the previous error path in > mark_index_clustered() be reached through a different mean than ALTER > TABLE? That was one of the things we discussed in the previous emails. The remaining callers of that function are VACUUM FULL and CLUSTER. It definitely can't be hit by VACUUM (it passes an InvalidOid for an index), but CLUSTER is a bit more difficult to follow. It seems like to me that it shouldn't be hit (CLUSTER only calls it for leaf partitions, where the check will be false), but I'm not 100% sure about my diagnosis.
Commits
-
Refactor some code around ALTER TABLE [NO] INHERIT
- 1a7ccd2b332d 19 (unreleased) landed
-
Add regression test for ALTER TABLE .. NO INHERIT on typed tables
- cbf9a72993ec 19 (unreleased) landed
-
Reject ALTER TABLE .. CLUSTER earlier for partitioned tables
- c336133c65a7 19 (unreleased) landed
-
Ignore partitioned indexes where appropriate
- 05fb5d661925 11.0 cited