| From: | Antonin Houska <ah(at)cybertec(dot)at> |
|---|---|
| To: | Adam Lee <adam8157(at)gmail(dot)com> |
| Cc: | Manu <manuelreyesbravo(at)gmail(dot)com>, Alberto Piai <alberto(dot)piai(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, alvherre(at)kurilemu(dot)de, pgsql-hackers(at)lists(dot)postgresql(dot)org, bharath(dot)rupireddyforpostgres(at)gmail(dot)com, mihailnikalayeu(at)gmail(dot)com |
| Subject: | Re: Allow progress tracking of sub-commands |
| Date: | 2026-11-26 16:52:58 |
| Message-ID: | 115460.1795711978@chrudos |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Adam Lee <adam8157(at)gmail(dot)com> wrote:
> Thanks for Cc-ing me. I tested and found two problems.
>
> 1. The progress row stays after CREATE INDEX CONCURRENTLY and REINDEX
> CONCURRENTLY.
I'm not able to reproduce these in v04 [1], maybe they got fixed along with
othe problems in v03. Can you please check?
> 2. In a parallel BRIN build, the leader's row loses its command and
> phase, and the workers get rows of their own.
>
> CREATE TABLE big AS
> SELECT g a, g % 97 b FROM generate_series(1, 4000000) g;
> ALTER TABLE big SET (parallel_workers = 2);
> SET max_parallel_maintenance_workers = 2;
> SET min_parallel_table_scan_size = 0;
> CREATE INDEX big_brin ON big USING brin (a);
>
> I sampled pg_stat_progress_create_index from another session about
> every 1 ms during the build, joined with pg_stat_activity.
>
> master, 101 samples, all the same:
>
> client backend CREATE INDEX building index
>
> v03, 104 of 106 samples:
>
> client backend command NULL initializing
> parallel worker command NULL initializing
> parallel worker command NULL initializing
>
> The other 2 samples show "CREATE INDEX, building index" for the
> leader. blocks_total and blocks_done still advance in the leader's
> row.
Sorry, I misunderstood the problem when finishing v04. I thought the leader
should report the progress too, so I modified
_brin_parallel_scan_and_build(). Now I see that it needs more work. It's
probably out of the scope of this patch anyway, so I'll remove the change in
the next version.
Thanks for testing!
[1] https://www.postgresql.org/message-id/115231.1795710799%40chrudos
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Antonin Houska | 2026-11-26 17:01:46 | Re: Allow progress tracking of sub-commands |
| Previous Message | Diego | 2026-11-26 16:48:01 | Re: [PATCH] libpq: Add PQpassfileLookup() |