Summary:
With incremental catalog cache refresh, existing connections normally do not need to perform catalog
preload after a DDL execution that increments the catalog version. The next new connection (or new
connections when there is a burst of them) still need to rebuild the on-disk relcache init file. In
recent stress tests it was suspected that new connections were causing some memory bloat because
they still need to perform catalog preloads.
This diff adds a new counter to assist debugging on how many new connections have performed catalog
preloads in order to rebuild relcache init file. Also added a metrics for the total number of authorized
connections so we can see what percentage of the connections ended up doing relcache preloads.
I had to add some callback in `ybc_util.cc` (instead of `ybc_pggate.cc`) because otherwise mac build fails
due to some different link mechanism between linux and mac. Also moved `YBCIsInitDbModeEnvVarSet`
there so that I can perform a CHECK added in `ybc_util.cc`.
Jira: DB-18237
Test Plan: ./yb_build.sh release --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NewConnectionRelCachePreloadTest -n 50
Reviewers: kfranz, sanketh
Reviewed By: kfranz
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D46614