(WIP) VACUUM REWRITE - CLUSTER by ctid - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject (WIP) VACUUM REWRITE - CLUSTER by ctid
Date
Msg-id 20091023114440.A17B.52131E4D@oss.ntt.co.jp
Whole thread Raw
Responses Re: (WIP) VACUUM REWRITE - CLUSTER by ctid
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: João Eugenio Marynowski
Date:
Subject: Re: table corrupted
Next
From: Robert Haas
Date:
Subject: Re: table corrupted