1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

pgstat: stats collector references in comments.

Soon the stats collector will be no more, with statistics instead getting
stored in shared memory. There are a lot of references to the stats collector
in comments. This commit replaces most of these references with "cumulative
statistics system", with the remaining ones getting replaced as part of
subsequent commits.

This is done separately from the - quite large - shared memory statistics
patch to make review easier.

Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Justin Pryzby <pryzby@telsasoft.com>
Reviewed-By: Thomas Munro <thomas.munro@gmail.com>
Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de
Discussion: https://postgr.es/m/20220308205351.2xcn6k4x5yivcxyd@alap3.anarazel.de
This commit is contained in:
Andres Freund
2022-04-06 13:56:06 -07:00
parent ab62a642d5
commit bdbd3d9064
31 changed files with 95 additions and 107 deletions

View File

@@ -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.)

View File

@@ -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);

View File

@@ -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)

View File

@@ -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

View File

@@ -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();