diff options
| author | Andres Freund | 2021-04-03 18:42:52 +0000 |
|---|---|---|
| committer | Andres Freund | 2021-04-03 18:42:52 +0000 |
| commit | e1025044cd4e7f33f7304aed54d5778b8a82cd5d (patch) | |
| tree | 2f35b9816d3d9040a4629f3899a137a7179565e8 /src/backend/bootstrap | |
| parent | 8d3a4c3eae5367fba60ab77c159814defba784fe (diff) | |
Split backend status and progress related functionality out of pgstat.c.
Backend status (supporting pg_stat_activity) and command
progress (supporting pg_stat_progress*) related code is largely
independent from the rest of pgstat.[ch] (supporting views like
pg_stat_all_tables that accumulate data over time). See also
a333476b925.
This commit doesn't rename the function names to make the distinction
from the rest of pgstat_ clearer - that'd be more invasive and not
clearly beneficial. If we were to decide to do such a rename at some
point, it's better done separately from moving the code as well.
Robert's review was of an earlier version.
Reviewed-By: Robert Haas <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/bootstrap')
| -rw-r--r-- | src/backend/bootstrap/bootstrap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index dce7088e6bb..174727b501d 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -407,8 +407,11 @@ AuxiliaryProcessMain(int argc, char *argv[]) */ CreateAuxProcessResourceOwner(); - /* Initialize backend status information */ + /* Initialize statistics reporting */ pgstat_initialize(); + + /* Initialize backend status information */ + pgstat_beinit(); pgstat_bestart(); /* register a before-shutdown callback for LWLock cleanup */ |
