Summary:
This change set enables extended stats for PG15-based YB.
- Enable ALTER STATISTICS in the grammar.
- Enable extended stats loading.
- Fix the crash during expression stats loading.
- Stop stripping off `RestrictInfo` from each clause in the clause lists in `yb_cost_seqscan`. `RestrictInfo` is necessary for finding the matching extended stats.
- Remove wasteful node output tuple count recomputation involving rebuilding a separate clause list similar to the one already available. Just use the value already computed by `set_baserel_size_estimates` instead. This makes the code more consistent with the original `cost_seqscan` and other (yb_)cost_xxxscan functions.
Jira: DB-3173
Test Plan:
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressPgStatsExt'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgEstimatedDocdbResultWidth'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressAggregates'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressAnalyze'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressResetAnalyze'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressPushdownKey'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgYbOptimizerStatistics'
Reviewers: tnayak, gkukreja
Reviewed By: tnayak
Subscribers: mihnea, smishra, yql
Differential Revision: https://phorge.dev.yugabyte.com/D37751