Re: Another incorrect comment for pg_stat_statements

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Japin Li <japinli@hotmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-28T07:36:29Z
Lists: pgsql-hackers
On Wed, Jun 28, 2023 at 03:09:55PM +0800, Richard Guo wrote:
> +1.  To nitpick, how about we remove the blank line just before removing
> the key for top level entry?
> 
> -  /* Also remove entries for top level statements */
> +  /* Also remove entries if exist for top level statements */
>    key.toplevel = true;
> -
> -  /* Remove the key if exists */
>    entry = (pgssEntry *) hash_search(pgss_hash, &key, HASH_REMOVE, NULL);

Why not if it improves the overall situation.  Could you send a patch
with everything you have in mind?
--
Michael

Commits

  1. pg_stat_statements: Fix second comment related to entry resets

  2. pg_stat_statements: Fix incorrect comment with entry resets

  3. Track identical top vs nested queries independently in pg_stat_statements