Re: [HACKERS] CLUSTER command progress monitor

Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>

From: Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>
To: Peter Geoghegan <pg@bowt.ie>, Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, jeff.janes@gmail.com, thomas.munro@enterprisedb.com, michael.paquier@gmail.com
Date: 2018-08-24T05:04:15Z
Lists: pgsql-hackers

Attachments

On 2017/11/22 6:07, Peter Geoghegan wrote:
> On Mon, Oct 2, 2017 at 6:04 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> Progress reporting on sorts seems like a tricky problem to me, as I
>> said before.  In most cases, a sort is going to involve an initial
>> stage where it reads all the input tuples and writes out quicksorted
>> runs, and then a merge phase where it merges all the output tapes into
>> a sorted result.  There are some complexities; for example, if the
>> number of tapes is really large, then we might need multiple merge
>> phases, only the last of which will produce tuples.
> 
> This would ordinarily be the point at which I'd say "but you're very
> unlikely to require multiple passes for an external sort these days".
> But I won't say that on this thread, because CLUSTER generally has
> unusually wide tuples, and so is much more likely to be I/O bound, to
> require multiple passes, etc. (I bet the v10 enhancements
> disproportionately improved CLUSTER performance.)

Hi,

I came back to develop the feature for community.
V4 patch is corrected these following points:

   - Rebase on master (143290efd)
   - Fix document
   - Replace the column name scan_index_relid with cluster_index_relid.
       Thanks to Jeff Janes!

I'm now working on improving the patch based on Robert's comment related to
"Seqscan and Sort case" and also considering how to handle the "Index scan case".

Please find attached file.

Regards,
Tatsuro Yamada

Commits

  1. Fix progress reporting of CLUSTER / VACUUM FULL

  2. Fix thinko when ending progress report for a backend

  3. Report progress of REINDEX operations

  4. Add progress reporting for CLUSTER and VACUUM FULL.

  5. Un-hide most cascaded-drop details in regression test results.

  6. Fix memory leak in printtup.c.

  7. Remove unused macro