From: | Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_reorg in core? |
Date: | 2012-09-21 04:00:47 |
Message-ID: | CAP7Qgm=EaKJnDsJ03_Tzpo70U5DxK9=u60=1K6GOZF+U-fToFg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 20, 2012 at 7:05 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Kupershmidt | 2012-09-21 04:17:02 | Re: pg_reorg in core? |
Previous Message | Tom Lane | 2012-09-21 03:33:03 | Re: 64-bit API for large object |