Prev: BUG #5065: pg_ctl start fails as administrator,with "could not locate matching postgres executable"
Next: [HACKERS] License clarification: BSD vs MIT
From: Heikki Linnakangas on 23 Oct 2009 02:55 Itagaki Takahiro wrote: > 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? I got the impression that replacing VACUUM FULL is the most popular opinion. I like VACUUM REWRITE myself, except that it would require making REWRITE a reserved keyword. I don't like tacking this onto CLUSTER, particularly not with "ORDER BY ctid". ctids are an implementation detail most users don't care about, and ORDER BY sounds like it's sorting something, but it's not. > 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. I don't think it's really necessary. You might as well put a few "if (indexOid)" clauses directly into copy_heap_data. > 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. Isn't that the same as having no clustering index? We already have "ALTER TABLE tbl SET WITHOUT CLUSTER". -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Itagaki Takahiro on 25 Oct 2009 22:54
Heikki Linnakangas <heikki.linnakangas(a)enterprisedb.com> wrote: > I got the impression that replacing VACUUM FULL is the most popular > opinion. I like VACUUM REWRITE myself, except that it would require > making REWRITE a reserved keyword. My next proposal for the syntex is "VACUUM (options) table_name". Since "options" are quoted by '(' and ')', we can add new options without adding them into reserved keywords. The traditional vacuum syntax: VACUUM FULL FREEZE VERBOSE ANALYZE table_name (columns); will be: VACUUM (FULL, FREEZE, VERBOSE, ANALYZE) table_name (columns); I think the syntax is consistent with existing syntex of "EXPLAIN (...)". We can choose any keyword for the new "rewrite" version. For example: * VACUUM ( REWRITE ) * VACUUM ( FULL [ INPLACE | REPLACE ] ) Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |