Re: BUG #15378: SP-GIST memory context screwup?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: BUG #15378: SP-GIST memory context screwup?
Date: 2018-09-11 14:53:43
Message-ID: 8736ugqekv.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Alexander" == Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:

>> So this logic was added in ccd6eb49a and was wrong from the start.
>> Testing suggests that removing the offending pfree does indeed fix
>> the issue; any objections?

Alexander> No objections from me. What about moving
Alexander> MemoryContextReset(so->traversalCxt) into
Alexander> resetSpGistScanOpaque()? For me it seems that resetting of
Alexander> traversal memory context is part of opaque reset.

Looking at all those retail pfrees makes me itch... is there some reason
why reconstructedValue couldn't go in the traversal context too, and
then the list nodes could go there as well, and the whole thing freed
with a context reset?

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message kalyani kaniganti 2018-09-11 15:27:26 Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error The source cluster was not shut down cleanly.
Previous Message Alexander Korotkov 2018-09-11 14:39:36 Re: BUG #15378: SP-GIST memory context screwup?