memory leak in GIN - Mailing list pgsql-hackers

From Jaime Casanova
Subject memory leak in GIN
Date
Msg-id CAJGNTeMR1ndMU2Thpr8GPDUfiHTV7idELJRFusA5UXUGY1y-eA@mail.gmail.com
Whole thread Raw
Responses Re: memory leak in GIN
List pgsql-hackers
Hi,

On the spanish list, Felipe de Jesús Molina Bravo, reported a few days
back that a query that worked well in 9.4 consume all memory in 9.5.
With the self contained test he provided us i reproduced the problem
in 9.5 and 9.6dev.

To test, execute:

pba.sql -- to create the tables and populate
query_crash.sql -- this will consume all your memory and crash your
server eventually

If you drop the GIN indexes, the problem disappear.

I used valgrind to try to hunt the memory leak, attached the resulting
log showing the backend that executed the query. And from the little a
could say from the stack trace valgrind showed, the problem is around
ginPostingListDecodeAllSegments() but i don't see any modifications
there.

--
Jaime Casanova                      www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance improvement for joins where outer side is unique
Next
From: Tom Lane
Date:
Subject: Re: eXtensible Transaction Manager API (v2)