Why would a rails 5 upgrade drastically increase database CPU usage? Why would a rails 5 upgrade drastically increase database CPU usage? postgresql postgresql

Why would a rails 5 upgrade drastically increase database CPU usage?


We eventually tracked this down to an issue in activerecord: https://github.com/rails/rails/issues/27201

Basically, since changed? was sometimes erroneously set to true, we were doing more queries in rails 5 than in rails 4, and we were mis-reading the reports in RDS, so we had not identified the increase in queries.