Re: POC: track vacuum/analyze cumulative time per relation - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: POC: track vacuum/analyze cumulative time per relation
Date
Msg-id CAA5RZ0vpAA+jXiCjjO5DGbLTUVmqe99ioCx0dkg1FKNc1h2biA@mail.gmail.com
Whole thread Raw
In response to Re: POC: track vacuum/analyze cumulative time per relation  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
> I think that this is hiding a behavior change while adding new
> counters, and both changes are independent.

That's a fair point.

> Another thing that is
> slightly incorrect to do if we take the argument of only adding the
> counters is moving around the call of pgstat_progress_end_command(),
> because it's not really wrong as-is, either.  I'd suggest to make all
> that a separate discussion.

Yeah, we have inconsistency between when vacuum and analyze
command ends as well as inconsistency  between the time
reported to pg_stats vs the logs. I will start a follow-up thread for
this.

> I have put my hands on this patch, and at the end I think that we
> should just do the attached, which is simpler and addresses your
> use-case.  Note also that the end time is acquired while the entries
> are not locked in the report routines, and some tweaks in the docs and
> comments.

Thanks for the update. This LGTM.

Regards,

Sami



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Eagerly scan all-visible pages to amortize aggressive vacuum
Next
From: Masahiko Sawada
Date:
Subject: Re: Eagerly scan all-visible pages to amortize aggressive vacuum