1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

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
a333476b92.

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 <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/20210316195440.twxmlov24rr2nxrg@alap3.anarazel.de
This commit is contained in:
Andres Freund
2021-04-03 11:42:52 -07:00
parent 8d3a4c3eae
commit e1025044cd
11 changed files with 1598 additions and 1392 deletions

View File

@ -681,6 +681,10 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
if (!bootstrap)
pgstat_initialize();
/* Initialize status reporting */
if (!bootstrap)
pgstat_beinit();
/*
* Load relcache entries for the shared system catalogs. This must create
* at least entries for pg_database and catalogs used for authentication.