pg_stat_statements: Fix incorrect comment with entry resets
authorMichael Paquier <[email protected]>
Wed, 28 Jun 2023 23:05:10 +0000 (08:05 +0900)
committerMichael Paquier <[email protected]>
Wed, 28 Jun 2023 23:05:10 +0000 (08:05 +0900)
Oversight in 6b4d23f.

Author: Japin Li, Richard Guo
Discussion: https://postgr.es/m/MEYP282MB1669FC91C764E277821936D3B624A@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Backpatch-through: 14

contrib/pg_stat_statements/pg_stat_statements.c

index 74dd35924e1d7824a7d5b7acc16995b5dd9821b1..d2bf6fc4d2590802afe038d862d3f2de86e0a725 100644 (file)
@@ -2524,10 +2524,8 @@ entry_reset(Oid userid, Oid dbid, uint64 queryid)
        if (entry)              /* found */
            num_remove++;
 
-       /* Also remove entries for top level statements */
+       /* Also remove the top-level entry if it exists. */
        key.toplevel = true;
-
-       /* Remove the key if exists */
        entry = (pgssEntry *) hash_search(pgss_hash, &key, HASH_REMOVE, NULL);
        if (entry)              /* found */
            num_remove++;