On Thu, Sep 20, 2012 at 7:05 PM, Michael Paquier
<michael.paqu...@gmail.com> wrote:
> Hi all,
>
> During the last PGCon, I heard that some community members would be
> interested in having pg_reorg directly in core.
> Just to recall, pg_reorg is a functionality developped by NTT that allows to
> redistribute a table without taking locks on it.
> The technique it uses to reorganize the table is to create a temporary copy
> of the table to be redistributed with a CREATE TABLE AS
> whose definition changes if table is redistributed with a VACUUM FULL or
> CLUSTER.
> Then it follows this mechanism:
> - triggers are created to redirect all the DMLs that occur on the table to
> an intermediate log table.
> - creation of indexes on the temporary table based on what the user wishes
> - Apply the logs registered during the index creation
> - Swap the names of freshly created table and old table
> - Drop the useless objects
>

I'm not familiar with pg_reorg, but I wonder why we need a separate
program for this task.  I know pg_reorg is ok as an external program
per se, but if we could optimize CLUSTER (or VACUUM which I'm a little
pessimistic about) in the same way, it's much nicer than having
additional binary + extension.  Isn't it possible to do the same thing
above within the CLUSTER command?  Maybe CLUSTER .. CONCURRENTLY?

Thanks,
-- 
Hitoshi Harada


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to