From 8e8a0becb335529c66a9f82f88e1419e49b458ae Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 11 Mar 2020 16:36:40 +0100 Subject: 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 Reviewed-by: Kuntal Ghosh Reviewed-by: Alvaro Herrera Discussion: https://www.postgresql.org/message-id/flat/c65e5196-4f04-4ead-9353-6088c19615a3@2ndquadrant.com --- src/backend/utils/adt/pgstatfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/utils/adt/pgstatfuncs.c') diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 54d26732541..cea01534a5e 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -841,7 +841,7 @@ pg_stat_get_activity(PG_FUNCTION_ARGS) } else values[17] = - CStringGetTextDatum(pgstat_get_backend_desc(beentry->st_backendType)); + CStringGetTextDatum(GetBackendTypeDesc(beentry->st_backendType)); /* SSL information */ if (beentry->st_ssl) -- cgit v1.2.3