Turn off JIT for only monitoring user's context #3384
Merged
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.
Dear, maintainers!
Thanks you for this operator and accumulation a lot of useful expertise around the best practices inside it. I bring a small improvement to the existing solution against memory leaks. Here it is.
It prevents issues related to monitoring queries:
related issues (CrunchyData/crunchy-containers#1381) (CrunchyData/pgmonitor#182)
On the other hand database is open to enabling JIT for other users
Signed-off-by: Kirill Petrov chobostar85@gmail.com
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
I believe that relevant discussions around JIT's memory leak is here: https://www.postgresql.org/message-id/20210417021602.7dilihkdc7oblrf7%40alap3.anarazel.de
The issue currently occurs atleast on Postgres 12.
Currently JIT is disabled in whole database: CrunchyData/crunchy-containers#1309
It's not transparent for other database users and in the case of enabling JIT, one can face memory leaks and performance issues again.
What is the new behavior (if this is a feature change)?
Disabling JIT in ccp_monitoring's context is more explicit than current approach, thus I hope it safer for plain PGO users and obvious for PGO developers.
Other Information: