diff options
Diffstat (limited to 'src/backend/postmaster')
-rw-r--r-- | src/backend/postmaster/autovacuum.c | 14 | ||||
-rw-r--r-- | src/backend/postmaster/bgwriter.c | 4 | ||||
-rw-r--r-- | src/backend/postmaster/checkpointer.c | 14 | ||||
-rw-r--r-- | src/backend/postmaster/pgarch.c | 8 | ||||
-rw-r--r-- | src/backend/postmaster/pgstat.c | 28 | ||||
-rw-r--r-- | src/backend/postmaster/walwriter.c | 9 |
6 files changed, 34 insertions, 43 deletions
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 681ef91b81e..c6d30fa5271 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 d1f5d12eff8..447596b2a8b 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 a59c3cf0201..80914aa891c 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 d916ed39a8c..adfa404f464 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 6757df397cf..8cbed1d1bc3 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 102fa2a089f..e2c7eb78d69 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); |