Re: Conflicting updates of command progress
| От | Sami Imseih |
|---|---|
| Тема | Re: Conflicting updates of command progress |
| Дата | |
| Msg-id | CAA5RZ0s_Hta6PWDwY9Lf-c+14F+C13BK2ax=B6R7bmDNhN6xdQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Conflicting updates of command progress (Antonin Houska <ah@cybertec.at>) |
| Ответы |
Re: Conflicting updates of command progress
Re: Conflicting updates of command progress |
| Список | pgsql-hackers |
> While working on [1] I realized that some field of pg_stat_progress_cluste has
> weird value.
Is there a repro that you can share that shows the weird values? It sounds like
the repro is on top of [1]. Is that right?
> AFAICS the current design does not consider that one progress-reporting
> command can be called by another one.
pgstat_progress_start_command should only be called once by the entry
point for the
command. In theory, we could end up in a situation where start_command
is called multiple times during the same top-level command;
> Not sure what the correct fix is. We can
> either ignore update requests from the "nested" commands, or display the
There is a pattern where we do
```
if (progress)
pgstat_progress_update_param
```
cluster_rel can pass down a flag to index_build or others that update progress
to not report progress. Therefore, only the top level command is
updating progress.
what do you think?
[1] https://commitfest.postgresql.org/patch/5117/
--
Sami Imseih
Amazon Web Services (AWS)
В списке pgsql-hackers по дате отправления: