Split backend status and progress related functionality out of pgstat.c.
authorAndres Freund <andres@anarazel.de>
Sat, 3 Apr 2021 18:42:52 +0000 (11:42 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 3 Apr 2021 18:42:52 +0000 (11:42 -0700)
commite1025044cd4e7f33f7304aed54d5778b8a82cd5d
tree2f35b9816d3d9040a4629f3899a137a7179565e8
parent8d3a4c3eae5367fba60ab77c159814defba784fe
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
src/backend/bootstrap/bootstrap.c
src/backend/postmaster/pgstat.c
src/backend/utils/activity/Makefile
src/backend/utils/activity/backend_progress.c [new file with mode: 0644]
src/backend/utils/activity/backend_status.c [new file with mode: 0644]
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc.c
src/include/commands/progress.h
src/include/pgstat.h
src/include/utils/backend_progress.h [new file with mode: 0644]
src/include/utils/backend_status.h [new file with mode: 0644]