Re: Fix memory leak in gist_page_items() of pageinspect
| От | Bertrand Drouvot |
|---|---|
| Тема | Re: Fix memory leak in gist_page_items() of pageinspect |
| Дата | |
| Msg-id | aTvtNLhiFGBNzl7x@ip-10-97-1-34.eu-west-3.compute.internal обсуждение исходный текст |
| Ответ на | Re: Fix memory leak in gist_page_items() of pageinspect (Michael Paquier <michael@paquier.xyz>) |
| Список | pgsql-hackers |
Hi, On Fri, Dec 12, 2025 at 06:48:09PM +0900, Michael Paquier wrote: > On Fri, Dec 12, 2025 at 09:00:08AM +0000, Bertrand Drouvot wrote: > > On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote: > >> where CStringGetTextDatum() has made a copy of buf.data and assigned to > >> value[4], however buf.data is never free-ed. > > > > I did not look in details but I think that we should be in a short lived > > memory context here so we generally prefer to avoid using pfree for those cases. > > The only thing that does a memory allocation is the StringInfo, why > would a memory context be worth the complication here? I meant to say: we are probably already in a short lived memory context. I did not mean to say to switch to a new one. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: