Make ALTER COLUMN TYPE preserve clustered status for indexes it doesn't
Tom Lane <tgl@sss.pgh.pa.us>
Make ALTER COLUMN TYPE preserve clustered status for indexes it doesn't modify. Also fix a passel of problems with ALTER TABLE CLUSTER ON: failure to check that the index is safe to cluster on (or even belongs to the indicated rel, or even exists), and failure to broadcast a relcache flush event when changing an index's state.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/cluster.c | modified | +59 −31 |
| src/backend/commands/tablecmds.c | modified | +11 −3 |
| src/backend/utils/cache/inval.c | modified | +22 −1 |
| src/include/commands/cluster.h | modified | +5 −3 |
| src/include/utils/inval.h | modified | +3 −1 |