Re: Performance bug in prepared statement binding in 9.2?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance bug in prepared statement binding in 9.2?
Date: 2013-09-10 13:21:33
Message-ID: 20130910132133.GJ1024477@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 2013-09-10 08:45:33 -0400, Andrew Dunstan wrote:
>
> On 09/10/2013 08:20 AM, Andres Freund wrote:
>
> >A backtrace for this would be useful. Alternatively you could recompile
> >postgres using -fno-omit-frame-pointer in CFLAGS and use perf record -g.
>
> It's using a custom build, so this should be doable.

Great.

> >Any chance you have older prepared xacts, older sessions or something
> >like that around? I'd expect heap_prune* to be present in workloads that
> >spend significant time in heap_hot_search_buffer...
>
>
> Not sure about prepared transactions. There are certainly probably old
> prepared statements around, and long running transactions alongside this
> one.

Ok, long running transactions will do the trick. I quicky checked and
doing an index lookup for min/max histogram lookups was added *after*
8.4 which would explain why you're not seing the issue there
(c.f. 40608e7f949fb7e4025c0ddd5be01939adc79eec).

It getting slower and slower during a testrun would be explained by the
additional tuple versions amassing which cannot be marked dead because
of older transactions around. I guess those are also part of the test?

If I interpret things correctly you're using serializable? I guess there
is no chance to use repeatable read instead?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2013-09-10 13:23:17 Re: Performance bug in prepared statement binding in 9.2?
Previous Message Andrew Dunstan 2013-09-10 12:45:33 Re: Performance bug in prepared statement binding in 9.2?