From 3b34645678d1a516c148e3e27c26325708e92f6f Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Fri, 19 Nov 2021 08:43:12 -0800 Subject: [PATCH] Initialize backend status reporting during bootstrap. This allows a later commit to reduce the number of branches in performance sensitive functions during normal running, compared to a very minor saving during bootstrapping. Author: Melanie Plageman Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAAKRu_Yeg+vh6SHNEo1+=O7e-BPX35cU0XQM=YwQRnkFyv_y+w@mail.gmail.com --- src/backend/utils/init/postinit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 0c56c38a141..646126edee5 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -676,8 +676,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username, EnablePortalManager(); /* Initialize status reporting */ - if (!bootstrap) - pgstat_beinit(); + pgstat_beinit(); /* * Load relcache entries for the shared system catalogs. This must create -- 2.30.2