From: Tom Lane <tgl@sss.pgh.pa.us>
To: Antonin Houska <ah@cybertec.at>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] CLUSTER command progress monitor
Date: Mon, 20 Nov 2017 12:25:53 -0500
Message-ID: <16114.1511198753@sss.pgh.pa.us> (raw)
In-Reply-To: <15653.1511197525@localhost>
References: <59A77072.3090401@lab.ntt.co.jp>
<CA+TgmobcMQEFvJkEqunpXfj2Uuc21Lt_0X_nJowd9CEebY15GQ@mail.gmail.com>
<15653.1511197525@localhost>
Antonin Houska <ah@cybertec.at> writes:
> Robert Haas <robertmhaas@gmail.com> wrote:
>> These two phases overlap, though. I believe progress reporting for
>> sorts is really hard.
> Whatever complexity is hidden in the sort, cost_sort() should have taken it
> into consideration when called via plan_cluster_use_sort(). Thus I think that
> once we have both startup and total cost, the current progress of the sort
> stage can be estimated from the current number of input and output
> rows. Please remind me if my proposal appears to be too simplistic.
Well, even if you assume that the planner's cost model omits nothing
(which I wouldn't bet on), its result is only going to be as good as the
planner's estimate of the number of rows to be sorted. And, in cases
where people actually care about progress monitoring, it's likely that
the planner got that wrong, maybe horribly so. I think it's a bad idea
for progress monitoring to depend on the planner's estimates in any way
whatsoever.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, ah@cybertec.at, robertmhaas@gmail.com, yamada.tatsuro@lab.ntt.co.jp
Subject: Re: [HACKERS] CLUSTER command progress monitor
In-Reply-To: <16114.1511198753@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox