-
Notifications
You must be signed in to change notification settings - Fork 903
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
Fix memory leak in function telemetry #4532
Merged
Merged
Conversation
This file contains 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
hash_create will create the hash table in TopMemoryContext unless explicitly requested to create in different memory context. The function telemetry code did not explicitly request a different context leading to a memory leak.
3c8b663
to
5bff287
Compare
Codecov Report
@@ Coverage Diff @@
## main #4532 +/- ##
==========================================
+ Coverage 90.20% 90.23% +0.02%
==========================================
Files 222 222
Lines 41088 41087 -1
==========================================
+ Hits 37065 37073 +8
+ Misses 4023 4014 -9
Continue to review full report at Codecov.
|
RafiaSabih
approved these changes
Jul 20, 2022
fabriziomello
approved these changes
Jul 20, 2022
svenklemm
added a commit
to svenklemm/timescaledb
that referenced
this pull request
Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * timescale#4517 Fix prepared statement param handling in ChunkAppend * timescale#4522 Fix ANALYZE on dist hypertable for a set of nodes * timescale#4526 Fix gapfill group comparison for TOASTed values * timescale#4527 Handle stats properly for range types * timescale#4532 Fix memory leak in function telemetry * timescale#4534 Use explicit memory context with hash_create * timescale#4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill , @hongquani, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared statements
Merged
svenklemm
added a commit
to svenklemm/timescaledb
that referenced
this pull request
Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * timescale#4517 Fix prepared statement param handling in ChunkAppend * timescale#4522 Fix ANALYZE on dist hypertable for a set of nodes * timescale#4526 Fix gapfill group comparison for TOASTed values * timescale#4527 Handle stats properly for range types * timescale#4532 Fix memory leak in function telemetry * timescale#4534 Use explicit memory context with hash_create * timescale#4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill , @hongquani, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared statements
svenklemm
added a commit
to svenklemm/timescaledb
that referenced
this pull request
Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * timescale#4517 Fix prepared statement param handling in ChunkAppend * timescale#4522 Fix ANALYZE on dist hypertable for a set of nodes * timescale#4526 Fix gapfill group comparison for TOASTed values * timescale#4527 Handle stats properly for range types * timescale#4532 Fix memory leak in function telemetry * timescale#4534 Use explicit memory context with hash_create * timescale#4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared statements
svenklemm
added a commit
that referenced
this pull request
Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * #4517 Fix prepared statement param handling in ChunkAppend * #4522 Fix ANALYZE on dist hypertable for a set of nodes * #4526 Fix gapfill group comparison for TOASTed values * #4527 Handle stats properly for range types * #4532 Fix memory leak in function telemetry * #4534 Use explicit memory context with hash_create * #4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared statements
svenklemm
added a commit
that referenced
this pull request
Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * #4517 Fix prepared statement param handling in ChunkAppend * #4522 Fix ANALYZE on dist hypertable for a set of nodes * #4526 Fix gapfill group comparison for TOASTed values * #4527 Handle stats properly for range types * #4532 Fix memory leak in function telemetry * #4534 Use explicit memory context with hash_create * #4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared statements
svenklemm
added a commit
that referenced
this pull request
Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * #4517 Fix prepared statement param handling in ChunkAppend * #4522 Fix ANALYZE on dist hypertable for a set of nodes * #4526 Fix gapfill group comparison for TOASTed values * #4527 Handle stats properly for range types * #4532 Fix memory leak in function telemetry * #4534 Use explicit memory context with hash_create * #4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared statements
svenklemm
added a commit
that referenced
this pull request
Jul 25, 2022
This release is a patch release. We recommend that you upgrade at the next available opportunity. Among other things this release fixes several memory leaks, handling of TOASTed values in GapFill and parameter handling in prepared statements. **Bugfixes** * #4517 Fix prepared statement param handling in ChunkAppend * #4522 Fix ANALYZE on dist hypertable for a set of nodes * #4526 Fix gapfill group comparison for TOASTed values * #4527 Handle stats properly for range types * #4532 Fix memory leak in function telemetry * #4534 Use explicit memory context with hash_create * #4538 Fix chunk creation on hypertables with non-default statistics **Thanks** * @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak * @hleung2021 and @laocaixw for reporting an issue with parameter handling in prepared 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.
hash_create will create the hash table in TopMemoryContext unless
explicitly requested to create in different memory context. The
function telemetry code did not explicitly request a different
context leading to a memory leak.
Fixes #4507