Split backend status and progress related functionality out of pgstat.c.
Andres Freund <andres@anarazel.de>
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 <robertmhaas@gmail.com> Discussion: https://postgr.es/m/20210316195440.twxmlov24rr2nxrg@alap3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/bootstrap/bootstrap.c | modified | +4 −1 |
| src/backend/postmaster/pgstat.c | modified | +21 −1104 |
| src/backend/utils/activity/backend_progress.c | added | +112 −0 |
| src/backend/utils/activity/backend_status.c | added | +1077 −0 |
| src/backend/utils/activity/Makefile | modified | +2 −0 |
| src/backend/utils/init/postinit.c | modified | +4 −0 |
| src/backend/utils/misc/guc.c | modified | +1 −0 |
| src/include/commands/progress.h | modified | +1 −1 |
| src/include/pgstat.h | modified | +16 −286 |
| src/include/utils/backend_progress.h | added | +44 −0 |
| src/include/utils/backend_status.h | added | +316 −0 |
Discussion
- shared-memory based stats collector 339 messages · 2018-06-29 → 2024-12-10