Re: Transaction-lifespan memory leak with plpgsql DO blocks - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Transaction-lifespan memory leak with plpgsql DO blocks
Date
Msg-id CA+TgmoZP6dpNxcgxHi0hFtZ6qO+DAq=DiP_yR7VoTAuKe5cAQA@mail.gmail.com
Whole thread Raw
In response to Transaction-lifespan memory leak with plpgsql DO blocks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Transaction-lifespan memory leak with plpgsql DO blocks
Re: Transaction-lifespan memory leak with plpgsql DO blocks
List pgsql-hackers
On Tue, Nov 12, 2013 at 11:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Or we could say "what the heck are you doing executing tens of
> thousands of DO blocks?  Make it into a real live function;
> you'll save a lot of cycles on parsing costs."  I'm not sure that
> this is a usage pattern we ought to be optimizing for.

I'm not volunteering to spend time fixing this, but I disagree with
the premise that it isn't worth fixing, because I think it's a POLA
violation.  From the user's point of view, there are plausible reasons
for this to be slow, but there's really no reason to expect it to leak
memory.  That's a sufficiently astonishing result that it wouldn't be
surprising for this to get reported as a bug where a simple
performance gap wouldn't be, and I think if we don't fix it the
perception will be that we've left that bug unfixed.  Now, there are
lots of things we don't fix just because there is not an infinitely
large army of trained PostgreSQL hackers who love to fix other
people's bugs for free, so I'm not going to say we HAVE to fix this or
whatever - but neither do I think fixing it is useless and worthless.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Can we add sample systemd service file to git repo?
Next
From: Nicolas Barbier
Date:
Subject: Re: Fast insertion indexes: why no developments