diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-03-29 13:51:56 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-03-29 13:54:39 -0600 |
commit | 445c12f7dfa345b86e05dc610d665f9afde14c26 (patch) | |
tree | 132709696b9ab8666a8d10cb1eb6e4c73fb6ffc2 /activerecord/CHANGELOG.md | |
parent | e8a334a9ee87362e3a99a8a24eb7d28a6ad7ae04 (diff) | |
download | rails-445c12f7dfa345b86e05dc610d665f9afde14c26.tar.gz rails-445c12f7dfa345b86e05dc610d665f9afde14c26.tar.bz2 rails-445c12f7dfa345b86e05dc610d665f9afde14c26.zip |
Reduce memory usage when loading types in PG
We were never clearing the `PG::Result` object used to query the types
when the connection is first established. This would lead to a
potentially large amount of memory being retained for the life of the
connection.
Investigating this issue also revealed several low hanging fruit on the
performance of these methods, and the number of allocations has been
reduced by ~90%.
Fixes #19578
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index be3a461eda..8793d6de70 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,9 @@ +* Reduce memory usage from loading types on pg. + + Fixes #19578. + + *Sean Griffin* + * Add `config.active_record.warn_on_records_fetched_greater_than` option When set to an integer, a warning will be logged whenever a result set |