Re: [HACKERS] CLUSTER command progress monitor

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] CLUSTER command progress monitor
Дата
Msg-id 20190914043044.GD15406@paquier.xyz
обсуждение исходный текст
Ответ на Re: [HACKERS] CLUSTER command progress monitor  (Tattsu Yama <yamatattsu@gmail.com>)
Ответы Re: [HACKERS] CLUSTER command progress monitor  (Tattsu Yama <yamatattsu@gmail.com>)
Список pgsql-hackers
On Sat, Sep 14, 2019 at 01:06:32PM +0900, Tattsu Yama wrote:
> Thanks! I can review your patch for fix it.
> However, I was starting fixing the problem from the last day of PGConf.Asia
> (11 Sep).
> Attached file is WIP patch.In my patch, I added "command id" to all APIs of
> progress reporting to isolate commands. Therefore, it doesn't allow to
> cascade updating system views. And my patch is on WIP so it needs clean-up
> and test.
> I share it anyway. :)

+       if (cmdtype == PROGRESS_COMMAND_INVALID || beentry->st_progress_command == cmdtype)
+       {
+               PGSTAT_BEGIN_WRITE_ACTIVITY(beentry);
+               beentry->st_progress_param[index] = val;
+               PGSTAT_END_WRITE_ACTIVITY(beentry);
+       }
You basically don't need the progress reports if the command ID is
invalid, no?

Another note is that you don't actually fix the problems related to
the calls of pgstat_progress_end_command() which have been added for
REINDEX reporting, so a progress report started for CLUSTER can get
ended earlier than expected, preventing the follow-up progress updates
to show up.
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BF failure: could not open relation with OID XXXX while querying pg_views
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] [PATCH] pageinspect function to decode infomasks