Re: Performance bug in prepared statement binding in 9.2?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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: 2014-11-10 23:51:12
Message-ID: 54614F70.9040103@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 11/10/2014 12:13 PM, Jeff Janes wrote:

> The related problem where the "end" rows are actually needed (e.g. ORDER
> BY...LIMIT) has not been fixed.
>
> My idea to fix that was to check if the row's creation-transaction was in
> the MVCC snapshot (which just uses local memory) before checking if that
> creation-transaction had committed (which uses shared memory). But I
> didn't really have the confidence to push that given the fragility of that
> part of the code and my lack of experience with it. See "In progress
> INSERT wrecks plans on table" thread.

Oh! I thought this issue had been fixed by Tom's patch as well. It
could very well describe what I'm seeing (in the other thread), since
some of the waiting queries are INSERTs, and other queries do selects
against the same tables concurrently.

Although ... given that I'm seeing preposterously long BIND times (like
50 seconds), I don't think that's explained just by bad plans.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message avpro avpro 2014-11-11 06:38:11 trigger Before or After
Previous Message Eric Ramirez 2014-11-10 22:52:18 Re: updating statistics on slow running query