Integrate query IDs with the hint table #193
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The hint table is reworked so as the normalized query string is replaced by the query ID generated by PostgreSQL, based on the jumbling done by the backend. This has multiple advantages:
Regression tests are adjusted to cope with this patch, where a PL/PgSQL function is added to be able to retrieve the query ID from a query string, as a wrapper for EXPLAIN (VERBOSE, JSON FORMAT). The query IDs can vary across platforms, so these are hidden to keep the tests portable. The following tweaks are done to the regression tests:
The documentation is updated, and the code in charge of the query normalization that was inherited from pg_stat_statements is removed, shaving a good chunk of code. On version upgrade, the past table is removed, replaced by the new one. Using the hint table requires an upgrade up to 1.7.0.