From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Unify several ways to tracking backend type |
Date: | 2020-03-13 13:28:37 |
Message-ID: | E1jCkMf-0007XE-Pj@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Unify several ways to tracking backend type
Add a new global variable MyBackendType that uses the same BackendType
enum that was previously only used by the stats collector. That way
several duplicate ways of checking what type a particular process is
can be simplified. Since it's no longer just for stats, move to
miscinit.c and rename existing functions to match the expanded
purpose.
Reviewed-by: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Reviewed-by: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Reviewed-by: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/c65e5196-4f04-4ead-9353-6088c19615a3(at)2ndquadrant(dot)com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8e8a0becb335529c66a9f82f88e1419e49b458ae
Modified Files
--------------
src/backend/bootstrap/bootstrap.c | 48 +++++++----------
src/backend/postmaster/autovacuum.c | 8 +--
src/backend/postmaster/bgworker.c | 2 +-
src/backend/postmaster/pgarch.c | 6 +--
src/backend/postmaster/pgstat.c | 105 ++----------------------------------
src/backend/postmaster/postmaster.c | 7 ++-
src/backend/postmaster/syslogger.c | 3 +-
src/backend/utils/adt/pgstatfuncs.c | 2 +-
src/backend/utils/init/miscinit.c | 55 +++++++++++++++++++
src/backend/utils/misc/ps_status.c | 11 +++-
src/include/miscadmin.h | 22 ++++++++
src/include/pgstat.h | 21 +-------
12 files changed, 126 insertions(+), 164 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-03-13 14:47:54 | pgsql: doc: Remove unused title ids |
Previous Message | Peter Eisentraut | 2020-03-13 12:31:44 | pgsql: Preserve replica identity index across ALTER TABLE rewrite |
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2020-03-13 13:32:01 | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |
Previous Message | Alvaro Herrera | 2020-03-13 13:21:14 | Re: [proposal] de-TOAST'ing using a iterator |