aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/activity/pgstat_database.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-04-04 12:14:34 -0700
committerAndres Freund <andres@anarazel.de>2022-04-04 13:53:34 -0700
commitedadf8098f4b2ca50bcc449f8857d0cc960b3c90 (patch)
tree710ed7455f85bf13e140aeff83b987b132014eea /src/backend/utils/activity/pgstat_database.c
parent4e34747c88a03ede6e9d731727815e37273d4bc9 (diff)
downloadpostgresql-edadf8098f4b2ca50bcc449f8857d0cc960b3c90.tar.gz
postgresql-edadf8098f4b2ca50bcc449f8857d0cc960b3c90.zip
pgstat: consistent function comment formatting.
There was a wild mishmash of function comment formatting in pgstat, making it hard to know what to use for any new function and hard to extend existing comments (particularly due to randomly different forms of indentation). Author: Andres Freund <andres@anarazel.de> Reviewed-By: Thomas Munro <thomas.munro@gmail.com> Discussion: https://postgr.es/m/20220329191727.mzzwbl7udhpq7pmf@alap3.anarazel.de Discussion: https://postgr.es/m/20220308205351.2xcn6k4x5yivcxyd@alap3.anarazel.de
Diffstat (limited to 'src/backend/utils/activity/pgstat_database.c')
-rw-r--r--src/backend/utils/activity/pgstat_database.c75
1 files changed, 24 insertions, 51 deletions
diff --git a/src/backend/utils/activity/pgstat_database.c b/src/backend/utils/activity/pgstat_database.c
index 31f6624c588..b4fba80835a 100644
--- a/src/backend/utils/activity/pgstat_database.c
+++ b/src/backend/utils/activity/pgstat_database.c
@@ -36,13 +36,10 @@ SessionEndType pgStatSessionEndCause = DISCONNECT_NORMAL;
static PgStat_Counter pgLastSessionReportTime = 0;
-/* ----------
- * pgstat_drop_database() -
- *
- * Tell the collector that we just dropped a database.
- * (If the message gets lost, we will still clean the dead DB eventually
- * via future invocations of pgstat_vacuum_stat().)
- * ----------
+/*
+ * Tell the collector that we just dropped a database.
+ * (If the message gets lost, we will still clean the dead DB eventually
+ * via future invocations of pgstat_vacuum_stat().)
*/
void
pgstat_drop_database(Oid databaseid)
@@ -57,11 +54,8 @@ pgstat_drop_database(Oid databaseid)
pgstat_send(&msg, sizeof(msg));
}
-/* --------
- * pgstat_report_recovery_conflict() -
- *
- * Tell the collector about a Hot Standby recovery conflict.
- * --------
+/*
+ * Tell the collector about a Hot Standby recovery conflict.
*/
void
pgstat_report_recovery_conflict(int reason)
@@ -77,11 +71,8 @@ pgstat_report_recovery_conflict(int reason)
pgstat_send(&msg, sizeof(msg));
}
-/* --------
- * pgstat_report_deadlock() -
- *
- * Tell the collector about a deadlock detected.
- * --------
+/*
+ * Tell the collector about a deadlock detected.
*/
void
pgstat_report_deadlock(void)
@@ -96,11 +87,8 @@ pgstat_report_deadlock(void)
pgstat_send(&msg, sizeof(msg));
}
-/* --------
- * pgstat_report_checksum_failures_in_db() -
- *
- * Tell the collector about one or more checksum failures.
- * --------
+/*
+ * Tell the collector about one or more checksum failures.
*/
void
pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount)
@@ -118,11 +106,8 @@ pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount)
pgstat_send(&msg, sizeof(msg));
}
-/* --------
- * pgstat_report_checksum_failure() -
- *
- * Tell the collector about a checksum failure.
- * --------
+/*
+ * Tell the collector about a checksum failure.
*/
void
pgstat_report_checksum_failure(void)
@@ -130,11 +115,8 @@ pgstat_report_checksum_failure(void)
pgstat_report_checksum_failures_in_db(MyDatabaseId, 1);
}
-/* --------
- * pgstat_report_tempfile() -
- *
- * Tell the collector about a temporary file.
- * --------
+/*
+ * Tell the collector about a temporary file.
*/
void
pgstat_report_tempfile(size_t filesize)
@@ -150,11 +132,8 @@ pgstat_report_tempfile(size_t filesize)
pgstat_send(&msg, sizeof(msg));
}
-/* --------
- * pgstat_report_connect() -
- *
- * Tell the collector about a new connection.
- * --------
+/*
+ * Tell the collector about a new connection.
*/
void
pgstat_report_connect(Oid dboid)
@@ -171,11 +150,8 @@ pgstat_report_connect(Oid dboid)
pgstat_send(&msg, sizeof(PgStat_MsgConnect));
}
-/* --------
- * pgstat_report_disconnect() -
- *
- * Tell the collector about a disconnect.
- * --------
+/*
+ * Tell the collector about a disconnect.
*/
void
pgstat_report_disconnect(Oid dboid)
@@ -262,15 +238,12 @@ pgstat_update_dbstats(PgStat_MsgTabstat *tsmsg, TimestampTz now)
}
}
-/* --------
- * pgstat_should_report_connstats() -
- *
- * We report session statistics only for normal backend processes. Parallel
- * workers run in parallel, so they don't contribute to session times, even
- * though they use CPU time. Walsender processes could be considered here,
- * but they have different session characteristics from normal backends (for
- * example, they are always "active"), so they would skew session statistics.
- * ----------
+/*
+ * We report session statistics only for normal backend processes. Parallel
+ * workers run in parallel, so they don't contribute to session times, even
+ * though they use CPU time. Walsender processes could be considered here,
+ * but they have different session characteristics from normal backends (for
+ * example, they are always "active"), so they would skew session statistics.
*/
static bool
pgstat_should_report_connstat(void)