model-writtenrun 9171 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Konstantin Knizhnik reported a memory leak when using ICU and supplied a fix in #1.
- The patch in #1 frees the converted ICU buffer in str_tolower, str_toupper and str_initcap after converting the result back.
- Michael Paquier reported in #2 that a lower() workload using an ICU collation consumed more memory without the patch, although Valgrind did not complain.
- Michael Paquier explained in #2 that these functions cannot rely on their callers to clean up the memory context containing the allocation.
- The patch from #1 landed unchanged as 3a54eb1a38, and Michael Paquier closed the thread by confirming application and backpatching through PostgreSQL 10 in #2.