From: Andres Freund Date: Fri, 19 Nov 2021 16:43:12 +0000 (-0800) Subject: Initialize backend status reporting during bootstrap. X-Git-Tag: REL_15_BETA1~1164 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=3b34645678d1a516c148e3e27c26325708e92f6f;p=postgresql.git 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 --- 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