Re: Parallel vacuum: I/O timings in the log leave out the parallel workers - Mailing list pgsql-hackers

From shihao zhong
Subject Re: Parallel vacuum: I/O timings in the log leave out the parallel workers
Date
Msg-id CAGRkXqRGZxmWrwuL1GjkM7Sa_DYzXeEfHg-iJv53zqetEOTwJw@mail.gmail.com
Whole thread
In response to Re: Parallel vacuum: I/O timings in the log leave out the parallel workers  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
> So I'm inclined to backpatch it to 17. Thoughts?

+1 for 17. From 17 on, pgstat_count_io_op_time() feeds pgStatBlockReadTime
and the BufferUsage fields from the same io_time for the same objects, so
without workers the log only changes by the rounding. 16 is different, as
you said.

I ran Bharath's reproducer and compared the log line with pg_stat_io for the
same VACUUM. On master the log said

    I/O timings: read: 200.596 ms, write: 200.286 ms

while pg_stat_io had

                   read ms   write ms
    leader         213.442    213.006
    workers         61.415    127.415

So the workers are missing, and the log is short even of the leader's own
time, which is the microsecond rounding Bharath mentioned.

With the patch the log matched leader plus workers within 0.3 ms.

Thanks,
Shihao

pgsql-hackers by date:

Previous
From: Ilia Evdokimov
Date:
Subject: Skip LEFT/ANTI joins to a provably empty inner rel
Next
From: Peter Eisentraut
Date:
Subject: Re: Add returns_nonnull to infallible allocators