Summary:
Original commit: a822676a3c14a160966648e12cf1e72d3995e68e / D43933
Currently, we don't have a way to disable the PG backend hint table cache added in D43933. If a customer runs into an issue with it or if it turns out to have a bug in it, we would like to have a way to disable it.
This diff introduces a new GUC, `pg_hint_plan.yb_enable_hint_table_cache`, which is `true` by default. Setting this GUC to `false` will disable the hint cache completely, causing `pg_hint_plan` to fall back to the previous behavior where it reads hints from the hint table during query planning.
**We make the following behavioral changes when the GUC is set to `false`:**
1. During startup, we don't install the relcache invalidation hook used for invalidating the hint cache.
2. The trigger on the hint cache table remains installed, since it gets installed when the user runs `CREATE EXTENSION pg_hint_plan`. But the trigger is configured to do nothing when the GUC is set to false.
3. During query planning, when looking up the hint for a query, we skip over the hint cache and go straight to the hint table in `get_hints_from_table`. When the GUC is disabled, this function operates identically to how it did before D43933.
NOTE: This GUC is `PGC_BACKEND`, meaning that it can only be set from the `ysql_pg_conf_csv` file or by client request in the connection
startup packet. This is done to prevent attempts to change the GUC on a running backend, which could result in a corrupted state.
Jira: DB-16635
Test Plan:
```
./yb_build.sh release --sj --cxx-test pg_hint_table-test
```
Added a new test to this file that sets the GUC to false and checks that the hint cache is not being used.
Reviewers: myang
Reviewed By: myang
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D44304