On 6/2/21 6:38 PM, Alvaro Herrera wrote:
> On 2021-Jun-02, Tomas Vondra wrote:
>
>> Hi,
>>
>> While experimenting with parallel index builds, I've noticed a somewhat
>> strange behavior of pg_stat_progress_create_index when a btree index is
>> built with parallel workers - some of the phases seem to be missing.
>
> Hmm, that's odd. I distinctly recall testing the behavior with parallel
> workers, and it is mentioned by Rahila in the original thread, and I
> think we tried to ensure that it was sane. I am surprised to learn that
> there's such a large gap.
>
Yeah, I quickly skimmed [1] which I think is the thread you're referring
to, and there is some discussion about parallel workers. I haven't read
it in detail, though.
[1]
https://www.postgresql.org/message-id/20181220220022.mg63bhk26zdpvmcj%40alvherre.pgsql
> I'll go have a deeper look at the provided patch and try to get it
> backpatched.
>
> I think it would be valuable to have some kind of test mode where the
> progress reporting APIs would make some noise (perhaps with a bespoke
> GUC option) so that we can test things in some automated manner ...
>
True, but how would that GUC work? Would it add something into the
system view, or just log something?
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company