Fix typos in comments.
authorEtsuro Fujita <[email protected]>
Sat, 3 May 2025 10:10:00 +0000 (19:10 +0900)
committerEtsuro Fujita <[email protected]>
Sat, 3 May 2025 10:10:00 +0000 (19:10 +0900)
Also adjust the phrasing in the comments.

Author: Etsuro Fujita <[email protected]>
Author: Heikki Linnakangas <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Reviewed-by: Gurjeet Singh <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Discussion: https://postgr.es/m/CAPmGK17%3DPHSDZ%2B0G6jcj12buyyE1bQQc3sbp1Wxri7tODT-SDw%40mail.gmail.com
Backpatch-through: 15

src/backend/utils/activity/pgstat_database.c
src/backend/utils/activity/pgstat_function.c
src/backend/utils/activity/pgstat_relation.c
src/backend/utils/activity/pgstat_subscription.c

index 52d82d25352d0fd95f832569c43b2918bdb2d4be..b31f20d41bcc557ae3fcc5b38ec024635969a0b2 100644 (file)
@@ -421,8 +421,8 @@ pgstat_reset_database_timestamp(Oid dboid, TimestampTz ts)
 /*
  * Flush out pending stats for the entry
  *
- * If nowait is true, this function returns false if lock could not
- * immediately acquired, otherwise true is returned.
+ * If nowait is true and the lock could not be immediately acquired, returns
+ * false without flushing the entry.  Otherwise returns true.
  */
 bool
 pgstat_database_flush_cb(PgStat_EntryRef *entry_ref, bool nowait)
index bc4e254d02d3bde4b71fead4710e5314304ad130..6214f93d36e0c3a49557b103b105aa94e98c416f 100644 (file)
@@ -186,8 +186,8 @@ pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize)
 /*
  * Flush out pending stats for the entry
  *
- * If nowait is true, this function returns false if lock could not
- * immediately acquired, otherwise true is returned.
+ * If nowait is true and the lock could not be immediately acquired, returns
+ * false without flushing the entry.  Otherwise returns true.
  */
 bool
 pgstat_function_flush_cb(PgStat_EntryRef *entry_ref, bool nowait)
index eeb2d43cb10fe7ac473f22b83bfb6688f969bfb7..28587e2916b1d1ad9cc4191bb6db07741592ae76 100644 (file)
@@ -806,8 +806,8 @@ pgstat_twophase_postabort(TransactionId xid, uint16 info,
 /*
  * Flush out pending stats for the entry
  *
- * If nowait is true, this function returns false if lock could not
- * immediately acquired, otherwise true is returned.
+ * If nowait is true and the lock could not be immediately acquired, returns
+ * false without flushing the entry.  Otherwise returns true.
  *
  * Some of the stats are copied to the corresponding pending database stats
  * entry when successfully flushing.
index 830d408c61a38d972d32a6df48681e6fc8c8e915..f9a1c831a07e6c40c09f8b68e13dc5a648fa83b9 100644 (file)
@@ -96,8 +96,8 @@ pgstat_fetch_stat_subscription(Oid subid)
 /*
  * Flush out pending stats for the entry
  *
- * If nowait is true, this function returns false if lock could not
- * immediately acquired, otherwise true is returned.
+ * If nowait is true and the lock could not be immediately acquired, returns
+ * false without flushing the entry.  Otherwise returns true.
  */
 bool
 pgstat_subscription_flush_cb(PgStat_EntryRef *entry_ref, bool nowait)