(WIP) VACUUM REWRITE - CLUSTER by ctid

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: (WIP) VACUUM REWRITE - CLUSTER by ctid
Date: 2009-10-23 03:08:06
Message-ID: 20091023114440.A17B.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
cluster-without-index_20091023.patch application/octet-stream 11.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-10-23 04:09:52 Re: table corrupted
Previous Message João Eugenio Marynowski 2009-10-23 03:00:25 Re: table corrupted