Re: Conflicting updates of command progress

2025-04-25 Thread Antonin Houska
Sami Imseih wrote: > > pgstat_progress_start_command() is called twice: First with > > cmdtype=PROGRESS_COMMAND_CLUSTER, second with > > PROGRESS_COMMAND_CREATE_INDEX. The first happens in cluster_rel() the second > > in cluster_rel() -> rebuild_relation() -> finish_heap_swap() -> > > reindex_rel

Re: Conflicting updates of command progress

2025-04-24 Thread Sami Imseih
> pgstat_progress_start_command() is called twice: First with > cmdtype=PROGRESS_COMMAND_CLUSTER, second with > PROGRESS_COMMAND_CREATE_INDEX. The first happens in cluster_rel() the second > in cluster_rel() -> rebuild_relation() -> finish_heap_swap() -> > reindex_relation() -> reindex_index(). > >

Re: Conflicting updates of command progress

2025-04-24 Thread Antonin Houska
Sami Imseih wrote: > >> 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 only in theory - it actually hap

Re: Conflicting updates of command progress

2025-04-23 Thread Antonin Houska
Fujii Masao wrote: > On 2025/04/15 2:13, Sami Imseih wrote: > >> While working on [1] I realized that some field of pg_stat_progress_cluste > >> has > >> weird value. > > I ran into the same issue while working on [2], and eventually had to > withdraw that patch because of it. Have you conside

Re: Conflicting updates of command progress

2025-04-23 Thread Sami Imseih
>> 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 only in theory - it actually happens when CLUSTER is rebuilding i

Re: Conflicting updates of command progress

2025-04-23 Thread Antonin Houska
Sami Imseih wrote: > > 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? Yes. > > AFAICS the current design doe

Re: Conflicting updates of command progress

2025-04-15 Thread Fujii Masao
On 2025/04/15 2:13, Sami Imseih wrote: While working on [1] I realized that some field of pg_stat_progress_cluste has weird value. I ran into the same issue while working on [2], and eventually had to withdraw that patch because of it. Is there a repro that you can share that shows the we

Re: Conflicting updates of command progress

2025-04-14 Thread Sami Imseih
> 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 > co