Re: [HACKERS] CLUSTER command progress monitor

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] CLUSTER command progress monitor
Дата
Msg-id 16114.1511198753@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] CLUSTER command progress monitor  (Antonin Houska <ah@cybertec.at>)
Ответы Re: [HACKERS] CLUSTER command progress monitor
Re: [HACKERS] CLUSTER command progress monitor
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Antonin Houska
Дата:
Сообщение: Re: [HACKERS] CLUSTER command progress monitor
Следующее
От: Martín Marqués
Дата:
Сообщение: Re: [HACKERS] pg_basebackup --progress output for batch execution