Justin Pryzby <pry...@telsasoft.com> writes: > On Thu, Dec 27, 2018 at 10:24:17AM -0300, Alvaro Herrera wrote: >> I think it would be valuable to have those ALTER TABLE variants that rewrite >> the table do so using the cluster order, if there is one, instead of the heap >> order, which is what it does today.
> That's a neat idea. TBH, I'm -1 on this. The current behavior of preserving physical order is perfectly sane, and it's faster than anything involving CLUSTER is going to be, and if you try to change that you are going to have enormous headaches with the variants of ALTER TABLE that would change the semantics of the CLUSTER index columns. (Unless of course your theory is that you don't actually care exactly what the finished order is, in which case why are we bothering?) The proposed patch which *forces* it to be done like that, whether the user wants it or not, seems particularly poorly thought out. regards, tom lane