Re: Fix comments related to pending statistics

2024-12-12 Thread Michael Paquier
On Thu, Dec 12, 2024 at 05:07:23AM +, Bertrand Drouvot wrote: > 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 > a

Re: Fix comments related to pending statistics

2024-12-11 Thread Bertrand Drouvot
Hi, On Thu, Dec 12, 2024 at 09:20:15AM +0900, Michael Paquier wrote: > On Wed, Dec 11, 2024 at 07:32:38AM +, 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

Re: Fix comments related to pending statistics

2024-12-11 Thread Michael Paquier
On Wed, Dec 11, 2024 at 07:32:38AM +, 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

Re: Fix comments related to pending statistics

2024-12-10 Thread Bertrand Drouvot
Hi, On Wed, Dec 11, 2024 at 02:56:08PM +0900, Michael Paquier wrote: > On Tue, Dec 10, 2024 at 02:16:14PM +, Bertrand Drouvot wrote: > > > > 2. One linked to PgStat_FunctionCounts pending stats, mentioning the use of > > memcmp() against zeroes to detect whether there are any pending stats: I

Re: Fix comments related to pending statistics

2024-12-10 Thread Michael Paquier
On Tue, Dec 10, 2024 at 02:16:14PM +, Bertrand Drouvot wrote: > 1. One linked to PgStat_TableCounts pending stats, mentioning the use of > memcmp() against zeroes to detect whether there are any stats updates to > apply. > > This is not true anymore as of 07e9e28b56. Oops, you're right. The

Fix comments related to pending statistics

2024-12-10 Thread Bertrand Drouvot
024 12:11:35 + Subject: [PATCH v1] Fix comments related to pending statistics The comment linked to the PgStat_TableCounts pending stats mentioning the use of memcmp() against zeroes to detect whether there are any stats updates to apply is not true anymore as of 07e9e28b56. The one linked