diff --git a/contrib/test_decoding/t/001_repl_stats.pl b/contrib/test_decoding/t/001_repl_stats.pl index fd82244a15..daf03ff147 100644 --- a/contrib/test_decoding/t/001_repl_stats.pl +++ b/contrib/test_decoding/t/001_repl_stats.pl @@ -88,8 +88,7 @@ regression_slot3|t|t), # Test to remove one of the replication slots and adjust # max_replication_slots accordingly to the number of slots. This leads # to a mismatch between the number of slots present in the stats file and the -# number of stats present in the shared memory, simulating the scenario for -# drop slot message lost by the statistics collector process. We verify +# number of stats present in shared memory. We verify # replication statistics data is fine after restart. $node->stop; diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c index 3a9532cb4f..666b6205a7 100644 --- a/src/backend/access/heap/heapam_handler.c +++ b/src/backend/access/heap/heapam_handler.c @@ -1089,8 +1089,8 @@ heapam_scan_analyze_next_tuple(TableScanDesc scan, TransactionId OldestXmin, * our own. In this case we should count and sample the row, * to accommodate users who load a table and analyze it in one * transaction. (pgstat_report_analyze has to adjust the - * numbers we send to the stats collector to make this come - * out right.) + * numbers we report to the cumulative stats system to make + * this come out right.) */ if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(targtuple->t_data))) { diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 9cdc8008c1..092b739dda 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -609,9 +609,9 @@ heap_vacuum_rel(Relation rel, VacuumParams *params, &frozenxid_updated, &minmulti_updated, false); /* - * Report results to the stats collector, too. + * Report results to the cumulative stats system, too. * - * Deliberately avoid telling the stats collector about LP_DEAD items that + * Deliberately avoid telling the stats system about LP_DEAD items that * remain in the table due to VACUUM bypassing index and heap vacuuming. * ANALYZE will consider the remaining LP_DEAD items to be dead "tuples". * It seems like a good idea to err on the side of not vacuuming again too @@ -2228,10 +2228,10 @@ lazy_vacuum(LVRelState *vacrel) * dead_items space is not CPU cache resident. * * We don't take any special steps to remember the LP_DEAD items (such - * as counting them in our final report to the stats collector) when + * as counting them in our final update to the stats system) when * the optimization is applied. Though the accounting used in * analyze.c's acquire_sample_rows() will recognize the same LP_DEAD - * items as dead rows in its own stats collector report, that's okay. + * items as dead rows in its own stats report, that's okay. * The discrepancy should be negligible. If this optimization is ever * expanded to cover more cases then this may need to be reconsidered. */ diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 736479295a..305226692a 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -680,7 +680,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params, } /* - * Now report ANALYZE to the stats collector. For regular tables, we do + * Now report ANALYZE to the cumulative stats system. For regular tables, we do * it only if not doing inherited stats. For partitioned tables, we only * do it for inherited stats. (We're never called for not-inherited stats * on partitioned tables anyway.) diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index df16533901..ce776c53ca 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -1665,7 +1665,7 @@ dropdb(const char *dbname, bool missing_ok, bool force) DropDatabaseBuffers(db_id); /* - * Tell the stats collector to forget it immediately, too. + * Tell the cumulative stats system to forget it immediately, too. */ pgstat_drop_database(db_id); diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 05e7b60059..9ab248d25e 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -338,10 +338,10 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, refresh_by_heap_swap(matviewOid, OIDNewHeap, relpersistence); /* - * Inform stats collector about our activity: basically, we truncated - * the matview and inserted some new data. (The concurrent code path - * above doesn't need to worry about this because the inserts and - * deletes it issues get counted by lower-level code.) + * Inform cumulative stats system about our activity: basically, we + * truncated the matview and inserted some new data. (The concurrent + * code path above doesn't need to worry about this because the inserts + * and deletes it issues get counted by lower-level code.) */ pgstat_count_truncate(matviewRel); if (!stmt->skipData) diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 85dacbe93d..51505373ea 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -1409,7 +1409,7 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel) * slot stays dropped even if the transaction rolls back. So we cannot * run DROP SUBSCRIPTION inside a transaction block if dropping the * replication slot. Also, in this case, we report a message for dropping - * the subscription to the stats collector. + * the subscription to the cumulative stats system. * * XXX The command name should really be something like "DROP SUBSCRIPTION * of a subscription that is associated with a replication slot", but we @@ -1583,7 +1583,7 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel) PG_END_TRY(); /* - * Send a message for dropping this subscription to the stats collector. + * Tell the cumulative stats system that the subscription is getting dropped. * We can safely report dropping the subscription statistics here if the * subscription is associated with a replication slot since we cannot run * DROP SUBSCRIPTION inside a transaction block. Subscription statistics diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index fb33953e35..04dbbe5530 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -352,8 +352,8 @@ vacuum(List *relations, VacuumParams *params, errmsg("PROCESS_TOAST required with VACUUM FULL"))); /* - * Send info about dead objects to the statistics collector, unless we are - * in autovacuum --- autovacuum.c does this for itself. + * Send info about dead objects to the cumulative stats system, unless + * we are in autovacuum --- autovacuum.c does this for itself. */ if ((params->options & VACOPT_VACUUM) && !IsAutoVacuumWorkerProcess()) pgstat_vacuum_stat(); diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 681ef91b81..c6d30fa527 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -1689,7 +1689,7 @@ AutoVacWorkerMain(int argc, char *argv[]) char dbname[NAMEDATALEN]; /* - * Report autovac startup to the stats collector. We deliberately do + * Report autovac startup to the cumulative stats system. We deliberately do * this before InitPostgres, so that the last_autovac_time will get * updated even if the connection attempt fails. This is to prevent * autovac from getting "stuck" repeatedly selecting an unopenable @@ -1996,9 +1996,9 @@ do_autovacuum(void) StartTransactionCommand(); /* - * Clean up any dead statistics collector entries for this DB. We always - * want to do this exactly once per DB-processing cycle, even if we find - * nothing worth vacuuming in the database. + * Clean up any dead statistics entries for this DB. We always want to do + * this exactly once per DB-processing cycle, even if we find nothing + * worth vacuuming in the database. */ pgstat_vacuum_stat(); @@ -3041,7 +3041,7 @@ recheck_relation_needs_vacanalyze(Oid relid, * * For analyze, the analysis done is that the number of tuples inserted, * deleted and updated since the last analyze exceeds a threshold calculated - * in the same fashion as above. Note that the collector actually stores + * in the same fashion as above. Note that the cumulative stats system stores * the number of tuples (both live and dead) that there were as of the last * analyze. This is asymmetric to the VACUUM case. * @@ -3051,8 +3051,8 @@ recheck_relation_needs_vacanalyze(Oid relid, * * A table whose autovacuum_enabled option is false is * automatically skipped (unless we have to vacuum it due to freeze_max_age). - * Thus autovacuum can be disabled for specific tables. Also, when the stats - * collector does not have data about a table, it will be skipped. + * Thus autovacuum can be disabled for specific tables. Also, when the cumulative + * stats system does not have data about a table, it will be skipped. * * A table whose vac_base_thresh value is < 0 takes the base value from the * autovacuum_vacuum_threshold GUC variable. Similarly, a vac_scale_factor diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c index d1f5d12eff..447596b2a8 100644 --- a/src/backend/postmaster/bgwriter.c +++ b/src/backend/postmaster/bgwriter.c @@ -240,9 +240,7 @@ BackgroundWriterMain(void) */ can_hibernate = BgBufferSync(&wb_context); - /* - * Send off activity statistics to the stats collector - */ + /* Report pending statistics to the cumulative stats system */ pgstat_send_bgwriter(); if (FirstCallSinceLastCheckpoint()) diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index a59c3cf020..80914aa891 100644 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@ -492,12 +492,8 @@ CheckpointerMain(void) /* Check for archive_timeout and switch xlog files if necessary. */ CheckArchiveTimeout(); - /* - * Send off activity statistics to the stats collector. - */ + /* Report pending statistics to the cumulative stats system */ pgstat_send_checkpointer(); - - /* Send WAL statistics to the stats collector. */ pgstat_send_wal(true); /* @@ -570,8 +566,8 @@ HandleCheckpointerInterrupts(void) * Close down the database. * * Since ShutdownXLOG() creates restartpoint or checkpoint, and - * updates the statistics, increment the checkpoint request and send - * the statistics to the stats collector. + * updates the statistics, increment the checkpoint request and flush + * out pending statistic. */ PendingCheckpointerStats.m_requested_checkpoints++; ShutdownXLOG(0, 0); @@ -718,9 +714,7 @@ CheckpointWriteDelay(int flags, double progress) CheckArchiveTimeout(); - /* - * Report interim activity statistics. - */ + /* Report interim statistics to the cumulative stats system */ pgstat_send_checkpointer(); /* diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index d916ed39a8..adfa404f46 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -477,8 +477,8 @@ pgarch_ArchiverCopyLoop(void) pgarch_archiveDone(xlog); /* - * Tell the collector about the WAL file that we successfully - * archived + * Tell the cumulative stats system about the WAL file that we + * successfully archived */ pgstat_send_archiver(xlog, false); @@ -487,8 +487,8 @@ pgarch_ArchiverCopyLoop(void) else { /* - * Tell the collector about the WAL file that we failed to - * archive + * Tell the cumulative stats system about the WAL file that we + * failed to archive */ pgstat_send_archiver(xlog, true); diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 6757df397c..8cbed1d1bc 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -693,9 +693,9 @@ allow_immediate_pgstat_restart(void) /* * Shut down a single backend's statistics reporting at process exit. * - * Flush any remaining statistics counts out to the collector. - * Without this, operations triggered during backend exit (such as - * temp table deletions) won't be counted. + * Flush out any remaining statistics counts. Without this, operations + * triggered during backend exit (such as temp table deletions) won't be + * counted. */ static void pgstat_shutdown_hook(int code, Datum arg) @@ -703,10 +703,10 @@ pgstat_shutdown_hook(int code, Datum arg) Assert(!pgstat_is_shutdown); /* - * If we got as far as discovering our own database ID, we can report what - * we did to the collector. Otherwise, we'd be sending an invalid - * database ID, so forget it. (This means that accesses to pg_database - * during failed backend starts might never get counted.) + * If we got as far as discovering our own database ID, we can flush out + * what we did so far. Otherwise, we'd be reporting an invalid database + * ID, so forget it. (This means that accesses to pg_database during + * failed backend starts might never get counted.) */ if (OidIsValid(MyDatabaseId)) pgstat_report_stat(true); @@ -1065,7 +1065,7 @@ pgstat_collect_oids(Oid catalogid, AttrNumber anum_oid) } /* - * Tell the statistics collector to reset counters for our database. + * Reset counters for our database. * * Permission checking for this function is managed through the normal * GRANT system. @@ -1084,7 +1084,7 @@ pgstat_reset_counters(void) } /* - * Tell the statistics collector to reset a single counter. + * Reset a single counter. * * Permission checking for this function is managed through the normal * GRANT system. @@ -1106,7 +1106,7 @@ pgstat_reset_single_counter(Oid objoid, PgStat_Single_Reset_Type type) } /* - * Tell the statistics collector to reset cluster-wide shared counters. + * Reset cluster-wide shared counters. * * Permission checking for this function is managed through the normal * GRANT system. @@ -1198,8 +1198,8 @@ pgstat_clear_snapshot(void) /* * Support function for the SQL-callable pgstat* functions. Returns * the collected statistics for one database or NULL. NULL doesn't mean - * that the database doesn't exist, it is just not yet known by the - * collector, so the caller is better off to report ZERO instead. + * that the database doesn't exist, just that there are no statistics, so the + * caller is better off to report ZERO instead. */ PgStat_StatDBEntry * pgstat_fetch_stat_dbentry(Oid dbid) @@ -1233,8 +1233,8 @@ pgstat_fetch_global(void) /* * Support function for the SQL-callable pgstat* functions. Returns * the collected statistics for one table or NULL. NULL doesn't mean - * that the table doesn't exist, it is just not yet known by the - * collector, so the caller is better off to report ZERO instead. + * that the table doesn't exist, just that there are no statistics, so the + * caller is better off to report ZERO instead. */ PgStat_StatTabEntry * pgstat_fetch_stat_tabentry(Oid relid) diff --git a/src/backend/postmaster/walwriter.c b/src/backend/postmaster/walwriter.c index 102fa2a089..e2c7eb78d6 100644 --- a/src/backend/postmaster/walwriter.c +++ b/src/backend/postmaster/walwriter.c @@ -257,7 +257,7 @@ WalWriterMain(void) else if (left_till_hibernate > 0) left_till_hibernate--; - /* Send WAL statistics to the stats collector */ + /* report pending statistics to the cumulative stats system */ pgstat_send_wal(false); /* @@ -295,12 +295,11 @@ HandleWalWriterInterrupts(void) if (ShutdownRequestPending) { /* - * Force to send remaining WAL statistics to the stats collector at - * process exit. + * Force reporting remaining WAL statistics at process exit. * * Since pgstat_send_wal is invoked with 'force' is false in main loop - * to avoid overloading to the stats collector, there may exist unsent - * stats counters for the WAL writer. + * to avoid overloading the cumulative stats system, there may exist + * unreported stats counters for the WAL writer. */ pgstat_send_wal(true); diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 815681ada7..f01fff3a90 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -1505,8 +1505,8 @@ is_checksummed_file(const char *fullpath, const char *filename) * * If 'missing_ok' is true, will not throw an error if the file is not found. * - * If dboid is anything other than InvalidOid then any checksum failures detected - * will get reported to the stats collector. + * If dboid is anything other than InvalidOid then any checksum failures + * detected will get reported to the cumulative stats system. * * Returns true if the file was successfully sent, false if 'missing_ok', * and the file did not exist. diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index ba2fcfeb4a..260b650f15 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2937,7 +2937,7 @@ die(SIGNAL_ARGS) ProcDiePending = true; } - /* for the statistics collector */ + /* for the cumulative stats system */ pgStatSessionEndCause = DISCONNECT_KILLED; /* If we're still here, waken anything waiting on the process latch */ @@ -4368,8 +4368,8 @@ PostgresMain(const char *dbname, const char *username) * * Note: this includes fflush()'ing the last of the prior output. * - * This is also a good time to send collected statistics to the - * collector, and to update the PS stats display. We avoid doing + * This is also a good time to flush out collected statistics to the + * cumulative stats system, and to update the PS stats display. We avoid doing * those every time through the message loop because it'd slow down * processing of batched messages, and because we don't want to report * uncommitted updates (that confuses autovacuum). The notification @@ -4710,7 +4710,7 @@ PostgresMain(const char *dbname, const char *username) */ case EOF: - /* for the statistics collector */ + /* for the cumulative statistics system */ pgStatSessionEndCause = DISCONNECT_CLIENT_EOF; /* FALLTHROUGH */ diff --git a/src/backend/utils/activity/pgstat_archiver.c b/src/backend/utils/activity/pgstat_archiver.c index 4a37b8f6e7..c829b91b60 100644 --- a/src/backend/utils/activity/pgstat_archiver.c +++ b/src/backend/utils/activity/pgstat_archiver.c @@ -22,8 +22,7 @@ /* - * Tell the collector about the WAL file that we successfully - * archived or failed to archive. + * Report archiver statistics */ void pgstat_send_archiver(const char *xlog, bool failed) diff --git a/src/backend/utils/activity/pgstat_bgwriter.c b/src/backend/utils/activity/pgstat_bgwriter.c index 0d9421666d..7e7eae8037 100644 --- a/src/backend/utils/activity/pgstat_bgwriter.c +++ b/src/backend/utils/activity/pgstat_bgwriter.c @@ -29,7 +29,7 @@ PgStat_MsgBgWriter PendingBgWriterStats; /* - * Send bgwriter statistics to the collector + * Report bgwriter statistics */ void pgstat_send_bgwriter(void) diff --git a/src/backend/utils/activity/pgstat_checkpointer.c b/src/backend/utils/activity/pgstat_checkpointer.c index f8358eb4e0..dbb9d861a4 100644 --- a/src/backend/utils/activity/pgstat_checkpointer.c +++ b/src/backend/utils/activity/pgstat_checkpointer.c @@ -29,7 +29,7 @@ PgStat_MsgCheckpointer PendingCheckpointerStats; /* - * Send checkpointer statistics to the collector + * Report checkpointer statistics */ void pgstat_send_checkpointer(void) diff --git a/src/backend/utils/activity/pgstat_database.c b/src/backend/utils/activity/pgstat_database.c index 6c38fe86a4..6d27657bdb 100644 --- a/src/backend/utils/activity/pgstat_database.c +++ b/src/backend/utils/activity/pgstat_database.c @@ -75,7 +75,7 @@ pgstat_report_autovac(Oid dboid) } /* - * Tell the collector about a Hot Standby recovery conflict. + * Report a Hot Standby recovery conflict. */ void pgstat_report_recovery_conflict(int reason) @@ -92,7 +92,7 @@ pgstat_report_recovery_conflict(int reason) } /* - * Tell the collector about a deadlock detected. + * Report a detected deadlock. */ void pgstat_report_deadlock(void) @@ -108,7 +108,7 @@ pgstat_report_deadlock(void) } /* - * Tell the collector about one or more checksum failures. + * Report one or more checksum failures. */ void pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount) @@ -127,7 +127,7 @@ pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount) } /* - * Tell the collector about a checksum failure. + * Report one checksum failure in the current database. */ void pgstat_report_checksum_failure(void) @@ -136,7 +136,7 @@ pgstat_report_checksum_failure(void) } /* - * Tell the collector about a temporary file. + * Report creation of temporary file. */ void pgstat_report_tempfile(size_t filesize) @@ -153,7 +153,7 @@ pgstat_report_tempfile(size_t filesize) } /* - * Tell the collector about a new connection. + * Notify stats system of a new connection. */ void pgstat_report_connect(Oid dboid) @@ -171,7 +171,7 @@ pgstat_report_connect(Oid dboid) } /* - * Tell the collector about a disconnect. + * Notify the stats system of a disconnect. */ void pgstat_report_disconnect(Oid dboid) diff --git a/src/backend/utils/activity/pgstat_relation.c b/src/backend/utils/activity/pgstat_relation.c index 957f5b858a..a78b8d2450 100644 --- a/src/backend/utils/activity/pgstat_relation.c +++ b/src/backend/utils/activity/pgstat_relation.c @@ -168,7 +168,7 @@ pgstat_drop_relation(Oid relid) #endif /* NOT_USED */ /* - * Tell the collector about the table we just vacuumed. + * Report that the table was just vacuumed. */ void pgstat_report_vacuum(Oid tableoid, bool shared, @@ -190,7 +190,7 @@ pgstat_report_vacuum(Oid tableoid, bool shared, } /* - * Tell the collector about the table we just analyzed. + * Report that the table was just analyzed. * * Caller must provide new live- and dead-tuples estimates, as well as a * flag indicating whether to reset the changes_since_analyze counter. @@ -210,10 +210,10 @@ pgstat_report_analyze(Relation rel, * already inserted and/or deleted rows in the target table. ANALYZE will * have counted such rows as live or dead respectively. Because we will * report our counts of such rows at transaction end, we should subtract - * off these counts from what we send to the collector now, else they'll - * be double-counted after commit. (This approach also ensures that the - * collector ends up with the right numbers if we abort instead of - * committing.) + * off these counts from the update we're making now, else they'll be + * double-counted after commit. (This approach also ensures that the + * shared stats entry ends up with the right numbers if we abort instead + * of committing.) * * Waste no time on partitioned tables, though. */ @@ -537,8 +537,8 @@ AtPrepare_PgStat_Relations(PgStat_SubXactStatus *xact_state) /* * All we need do here is unlink the transaction stats state from the * nontransactional state. The nontransactional action counts will be - * reported to the stats collector immediately, while the effects on - * live and dead tuple counts are preserved in the 2PC state file. + * reported to the stats system immediately, while the effects on live and + * dead tuple counts are preserved in the 2PC state file. * * Note: AtEOXact_PgStat_Relations is not called during PREPARE. */ diff --git a/src/backend/utils/activity/pgstat_replslot.c b/src/backend/utils/activity/pgstat_replslot.c index a9405cd135..35078ad73c 100644 --- a/src/backend/utils/activity/pgstat_replslot.c +++ b/src/backend/utils/activity/pgstat_replslot.c @@ -23,8 +23,8 @@ /* - * Tell the statistics collector to reset a single replication slot - * counter, or all replication slots counters (when name is null). + * Reset counters for a single replication slot, or all replication slots + * (when name is null). * * Permission checking for this function is managed through the normal * GRANT system. @@ -51,7 +51,7 @@ pgstat_reset_replslot_counter(const char *name) } /* - * Tell the collector about replication slot statistics. + * Report replication slot statistics. */ void pgstat_report_replslot(const PgStat_StatReplSlotEntry *repSlotStat) @@ -77,7 +77,7 @@ pgstat_report_replslot(const PgStat_StatReplSlotEntry *repSlotStat) } /* - * Tell the collector about creating the replication slot. + * Report replication slot creation. */ void pgstat_report_replslot_create(const char *slotname) @@ -92,7 +92,7 @@ pgstat_report_replslot_create(const char *slotname) } /* - * Tell the collector about dropping the replication slot. + * Report replication slot drop. */ void pgstat_report_replslot_drop(const char *slotname) diff --git a/src/backend/utils/activity/pgstat_slru.c b/src/backend/utils/activity/pgstat_slru.c index 3e284900b1..6dae3a5dc6 100644 --- a/src/backend/utils/activity/pgstat_slru.c +++ b/src/backend/utils/activity/pgstat_slru.c @@ -33,8 +33,7 @@ static PgStat_MsgSLRU SLRUStats[SLRU_NUM_ELEMENTS]; /* - * Tell the statistics collector to reset a single SLRU counter, or all - * SLRU counters (when name is null). + * Reset counters for a single SLRU, or all SLRUs (when name is null). * * Permission checking for this function is managed through the normal * GRANT system. diff --git a/src/backend/utils/activity/pgstat_subscription.c b/src/backend/utils/activity/pgstat_subscription.c index 70874e13f5..2ee23d5ae2 100644 --- a/src/backend/utils/activity/pgstat_subscription.c +++ b/src/backend/utils/activity/pgstat_subscription.c @@ -21,8 +21,8 @@ /* - * Tell the statistics collector to reset a single subscription - * counter, or all subscription counters (when subid is InvalidOid). + * Reset counters for a single subscription, or all subscriptions (when subid + * is InvalidOid). * * Permission checking for this function is managed through the normal * GRANT system. @@ -42,7 +42,7 @@ pgstat_reset_subscription_counter(Oid subid) } /* - * Tell the collector about the subscription error. + * Report a subscription error. */ void pgstat_report_subscription_error(Oid subid, bool is_apply_error) @@ -56,7 +56,7 @@ pgstat_report_subscription_error(Oid subid, bool is_apply_error) } /* - * Tell the collector about dropping the subscription. + * Report dropping the subscription. */ void pgstat_report_subscription_drop(Oid subid) diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index ce84525d40..fd4276fbc6 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -1,7 +1,7 @@ /*------------------------------------------------------------------------- * * pgstatfuncs.c - * Functions for accessing the statistics collector data + * Functions for accessing various forms of statistics data * * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California @@ -1820,7 +1820,7 @@ pg_stat_get_slru(PG_FUNCTION_ARGS) SetSingleFuncCall(fcinfo, 0); - /* request SLRU stats from the stat collector */ + /* request SLRU stats from the cumulative stats system */ stats = pgstat_fetch_slru(); for (i = 0;; i++) diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 7402696986..bd4b2c19b1 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -647,7 +647,7 @@ errfinish(const char *filename, int lineno, const char *funcname) fflush(stderr); /* - * Let the statistics collector know. Only mark the session as + * Let the cumulative stats system know. Only mark the session as * terminated by fatal error if there is no other known cause. */ if (pgStatSessionEndCause == DISCONNECT_NORMAL) diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 95bf06f829..77b6927518 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -1,7 +1,7 @@ /* ---------- * pgstat.h * - * Definitions for the PostgreSQL statistics collector daemon. + * Definitions for the PostgreSQL cumulative statistics system. * * Copyright (c) 2001-2022, PostgreSQL Global Development Group * @@ -86,7 +86,7 @@ typedef enum PgStat_Single_Reset_Type * it against zeroes to detect whether there are any counts to transmit. * * Note that the time counters are in instr_time format here. We convert to - * microseconds in PgStat_Counter format when transmitting to the collector. + * microseconds in PgStat_Counter format when flushing out pending statistics. * ---------- */ typedef struct PgStat_FunctionCounts diff --git a/src/include/utils/backend_status.h b/src/include/utils/backend_status.h index 8217d0cb6b..7403bca25e 100644 --- a/src/include/utils/backend_status.h +++ b/src/include/utils/backend_status.h @@ -85,8 +85,8 @@ typedef struct PgBackendGSSStatus * * Each live backend maintains a PgBackendStatus struct in shared memory * showing its current activity. (The structs are allocated according to - * BackendId, but that is not critical.) Note that the collector process - * has no involvement in, or even access to, these structs. + * BackendId, but that is not critical.) Note that this is unrelated to the + * cumulative stats system (i.e. pgstat.c et al). * * Each auxiliary process also maintains a PgBackendStatus struct in shared * memory. diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h index 6a828e3aa0..1923f56a3a 100644 --- a/src/include/utils/pgstat_internal.h +++ b/src/include/utils/pgstat_internal.h @@ -1,7 +1,7 @@ /* ---------- * pgstat_internal.h * - * Definitions for the PostgreSQL activity statistics facility that should + * Definitions for the PostgreSQL cumulative statistics system that should * only be needed by files implementing statistics support (rather than ones * reporting / querying stats). * diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out index 06a1d2f229..494fb26237 100644 --- a/src/test/regress/expected/stats.out +++ b/src/test/regress/expected/stats.out @@ -1,5 +1,5 @@ -- --- Test Statistics Collector +-- Test cumulative stats system -- -- Must be run after tenk2 has been created (by create_table), -- populated (by create_misc) and indexed (by create_index). diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql index ae1ec173e3..d0ba1f6d7b 100644 --- a/src/test/regress/sql/stats.sql +++ b/src/test/regress/sql/stats.sql @@ -1,5 +1,5 @@ -- --- Test Statistics Collector +-- Test cumulative stats system -- -- Must be run after tenk2 has been created (by create_table), -- populated (by create_misc) and indexed (by create_index).