From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-bugs@lists.postgresql.org, amdmi3@amdmi3.ru, Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Jakub Janeček <jakub.janecek@comgate.cz>
Subject: Re: BUG #15592: Memory overuse with subquery containing unnest() and set operations (11.x regression)
Date: Sat, 09 Feb 2019 12:19:08 -0500
Message-ID: <24396.1549732748@sss.pgh.pa.us> (raw)
In-Reply-To: <20190209153047.orqekxkpp6xz3gg4@alap3.anarazel.de>
References: <26375.1547483080@sss.pgh.pa.us>
<3935CFAF-8FD4-459E-B13F-67DFEE852028@anarazel.de>
<27372.1547484627@sss.pgh.pa.us>
<27649.1547485075@sss.pgh.pa.us>
<20190114180423.ywhdg2iagzvh43we@alap3.anarazel.de>
<20190114222838.h6r3fuyxjxkykf6t@alap3.anarazel.de>
<20190209094025.a2sf2lw3zvnhtrtq@alap3.anarazel.de>
<4491.1549722881@sss.pgh.pa.us>
<20190209150028.fmmy3xxobh5rqfru@alap3.anarazel.de>
<6147.1549724997@sss.pgh.pa.us>
<20190209153047.orqekxkpp6xz3gg4@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2019-02-09 10:09:57 -0500, Tom Lane wrote:
>> What is it you're actually hoping to do by removing this guarantee?
> I think we probably can do better in master, but I don't see a good
> solution that's not expensive in v11. The tuple hash table can be
> created / destroyed at a prodigious rate before 317ffdfea / 356687bd825,
> and I don't see a good way to get rid of needing an ExprContext created
> therein. We could register a callback on the memory context to drop the
> ExprContext, but unfortunately dropping ExprContexts retail isn't
> particularly cheap as it has to go through a singly linked list
> (something we ought to fix one day by using a doubly linked list, but
> certainly not a minor release).
Why not? I think converting that list into a dlist might be a perfectly
reasonable thing to do. Certainly there are ABI considerations in the
back branches, but we could probably dodge those adequately with the
usual hack of putting the added field at the end.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, andrew@tao11.riddles.org.uk, jakub.janecek@comgate.cz
Subject: Re: BUG #15592: Memory overuse with subquery containing unnest() and set operations (11.x regression)
In-Reply-To: <24396.1549732748@sss.pgh.pa.us>
References: <26375.1547483080@sss.pgh.pa.us> <3935CFAF-8FD4-459E-B13F-67DFEE852028@anarazel.de> <27372.1547484627@sss.pgh.pa.us> <27649.1547485075@sss.pgh.pa.us> <20190114180423.ywhdg2iagzvh43we@alap3.anarazel.de> <20190114222838.h6r3fuyxjxkykf6t@alap3.anarazel.de> <20190209094025.a2sf2lw3zvnhtrtq@alap3.anarazel.de> <4491.1549722881@sss.pgh.pa.us> <20190209150028.fmmy3xxobh5rqfru@alap3.anarazel.de> <6147.1549724997@sss.pgh.pa.us> <20190209153047.orqekxkpp6xz3gg4@alap3.anarazel.de> <24396.1549732748@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox