On Mon, Apr 22, 2024 at 10:25 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> writes:
> > But wouldn't it be good that VACUUM FULL uses that index defined by
> > Cluster, if it exists ?
>
> No ... what would be the difference then?
>
What the VACUUM docs "should" do, it seems, is suggest CLUSTER on the PK,
if the PK is a sequence (whether that be an actual sequence, or a timestamp
or something else that grows monotonically).
That's because the data is already roughly in PK order.