From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Fix comments related to pending statistics |
Date: | 2024-12-12 05:07:23 |
Message-ID: | Z1pvi495guUJF4A1@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Thu, Dec 12, 2024 at 09:20:15AM +0900, Michael Paquier wrote:
> On Wed, Dec 11, 2024 at 07:32:38AM +0000, Bertrand Drouvot wrote:
> > On Wed, Dec 11, 2024 at 02:56:08PM +0900, Michael Paquier wrote:
> >> Your suggestion does not look completely right to me. There is
> >> nothing preventing us from using something else than event counters
> >> since we don't use memcpy() and there is no comparison work, no? It
> >> seems to me that we could remove the entire sentence instead.
> >
> > Do you mean also remove the comments in pgstat_function_flush_cb() and
> > pgstat_subscription_flush_cb()? Those comments look fine to me given
> > the places where those pending entries are created meaning in
> > pgstat_init_function_usage() for the functions and pgstat_report_subscription_error()
> > and pgstat_report_subscription_conflict() for the subscriptions.
>
> My apologies for the confusion. I see no problem with the existing
> comments in pgstat_subscription_flush_cb() and
> pgstat_function_flush_cb() because they still apply.
got it, thanks for the clarification.
> The only thing we should do here is to remove the comment for
> PgStat_FunctionCounts because we could add pointers or something else
> than plain counters in this structure,
I see what you mean and you are right (I misread the initial comment so updated
it wrongly). Removed in v2 attached.
> and fix the comment of
> PgStat_TableCounts in the lines of what you are suggesting.
Yeap. I also just realized that the same kind of comments are missing for
PgStat_BgWriterStats and PgStat_CheckpointerStats (for which we make use
of pg_memory_is_all_zeros() to detect whether there are any stats updates to
apply). Adding those in passing.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Fix-and-add-comments-related-to-pending-statistic.patch | text/x-diff | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2024-12-12 05:38:33 | Re: Skip collecting decoded changes of already-aborted transactions |
Previous Message | Michael Paquier | 2024-12-12 05:02:13 | Re: pg_createsubscriber TAP test wrapping makes command options hard to read. |