Re: Fix comments related to pending statistics
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-12-12T00:20:15Z
Lists: pgsql-hackers
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. The comment in pgstat.h 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, and fix the comment of PgStat_TableCounts in the lines of what you are suggesting. -- Michael
Commits
-
Adjust some comments about structure properties in pg_stat.h
- 4766438aa317 18.0 landed