I'm working on alternative version of VACUUM FULL, which is like CLUSTER but sort tuples in ctid order without index. The original discussion is here: [HACKERS] Feedback on getting rid of VACUUM FULL http://archives.postgresql.org/pgsql-hackers/2009-09/msg01047.php
WIP patch attached. I have some questions over the development: 1. Syntax: I choose "CLUSTER tbl WITHOUT INDEX" for the syntax, but it is debatable. What syntax is the best? VACUUM REWRITE? CLUSTER ORDER BY ctid? or replace VACUUM FULL? 2. Superclass of HeapScanDesc and IndexScanDesc: We don't have an abstraction layer of HeapScanDesc and IndexScanDesc, but the layer is useful for this purpose. Is it reasonable? It is partially implemented as genam_beginscan() family in the patch. 3. Should we allow "ctid" as a default clustered index? We could assume "ctid" as a virtual index. The syntax for it might be "ALTER TABLE tbl CLUSTER ON COLUMN ctid" or so. Comments welcome. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
cluster-without-index_20091023.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers