-
Notifications
You must be signed in to change notification settings - Fork 55
file storage for aqo_query_texts #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Andrey2001
wants to merge
27
commits into
postgrespro:another_storage
from
Andrey2001:another_storage
Closed
file storage for aqo_query_texts #52
Andrey2001
wants to merge
27
commits into
postgrespro:another_storage
from
Andrey2001:another_storage
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
threads during the stress test on a postgres instance with installed AQO extension. This is enough to check correctness of concurrent access to a ML knowledge base.
Replace a Value node with A_Const (Integer) node because of 639a86e36a.
force_collect_stat GUC is enabled.
It is necessary to use AQO with cached plans. Improve interface of preprocessing module.
where an optimizer don't plan query because it uses an existed plan from the plancache.
…ommunity practice
could produce error on missed relation. Implement careful opening procedure. We should disable AQO in this backend if any storage relation isn't exists. But, this commit disables only query. TAP test on this issue was added at the end of 001_pgbench.pl.
It is drastically improves performance.
Pointlessly to call it on each planning hook execution.
We realized that plan serialization procedure and operations of removing substring is heavy. Core serialization code should be redesigned and rewrited.
Teach add_query_text to check existence of record (or concurrent insertion) and skip insertion in such case. It allows us to make simple modifications in the code. Now, we skip access to database in the DISABLED mode if it is not really necessary. Also, reduce a scope of custom lock on a query class in the aqo_planner and executor_end hooks.
It allows us to play with this status more flexible (Maybe later).
It means that we can store into a shared buffer total execution time, number of executions, may be another additional information, for each query. Queries in this buffer are grouped by a query class value in terms of the AQO extension. Profiling doesn't require any access to the AQO knowledge base, i.e. access to DBMS heap. So, here we have no large overhead. It can be used even in DISABLED mode. Some new additional interface tools were added: Two GUCS: aqo.profile_classes - defines allocated size of shared memory. aqo.profile_enable - on/off profiling feature. Functions: aqo_show_classes - returns list of classes from a profiling buffer. aqo_clear_classes - clear the profiling buffer. Main idea and core code implemented by Maxim Belov. Improvements and tests are made by me.
necessary for a profiling buffer allocation in shared memory.
disabled for a query.
…eryId values as pg_stat_statements. It reduces risk of conflicts and allow to use these extensions in conjunction. We want to use pg_stat_statements as profiler to switch on and switch off in controlled mode for the queries.
'aqo_fdw', 'unsupported' regression tests.
the storage for aqo_query_texts was made like storage for pg_stat_statements
Код нормальный. Есть замечания.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.