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 <melanieplageman@gmail.com>
Reviewed-By: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAAKRu_Yeg+vh6SHNEo1+=O7e-BPX35cU0XQM=YwQRnkFyv_y+w@mail.gmail.com
This commit is contained in:
Andres Freund 2021-11-19 08:43:12 -08:00
parent 0f0cfb4940
commit 3b34645678

View File

@ -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