Re: Performance bug in prepared statement binding in 9.2?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(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 20:13:09
Message-ID: CAMkU=1x8qZ4HZ7NmJN=w2vKhxMqyg-eo4awJ26e4jZLFNZsFHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Nov 10, 2014 at 11:04 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> On 11/10/2014 10:59 AM, Jeff Janes wrote:
> > On Mon, Nov 10, 2014 at 10:48 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> >
>
> >> Did this patch every make it in? Or did it hang waiting for
> verification?
> >>
> >
> > It made it in:
> >
> > commit 4162a55c77cbb54acb4ac442ef3565b813b9d07a
> > Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> > Date: Tue Feb 25 16:04:09 2014 -0500
>
> Thanks, then the problem I'm seeing now is something else.
>

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.

Simon also had some patches to still do the shared memory look up but make
them faster by caching where in the list it would be likely to find the
match, based on where it found the last match.

Cheers,

Jeff

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2014-11-10 21:40:01 Re: Lock pileup causes server to stall
Previous Message Josh Berkus 2014-11-10 19:50:26 Lock pileup causes server to stall