Re: BUG #8470: 9.3 locking/subtransaction performance regression

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8470: 9.3 locking/subtransaction performance regression
Date: 2015-06-20 04:36:50
Message-ID: 20150620043650.GX133018@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera wrote:

> The main catch of the "simple" formulation of the patch is that we do
> the new GetMultiXactIdMembers call with the buffer lock held, which is a
> horrible idea from a concurrency point of view; it will make many cases
> where the optimization doesn't apply a lot slower. I think with some
> extra contortions we could fix that problem, but it's already quite ugly
> that we have a duplicate check for the are-we-already-a-multixact-locker
> so I reject the idea that this seemingly simple patch is any good. I
> much prefer the complex formulation, which is what I had to start with,
> and makes thing a bit less unclear(*).

Here's an updated version of this patch. This applies to 9.3 and 9.4 and
restores performance to what's in master, while being much less invasive
than what was committed to master. But more importantly, what it does
is reduce the typical size of multixacts.

Since the size of multixacts is so critical with regards to the problems
of members overrun, I think it is a good idea to reduce it. In master
we already have an equivalent of this optimization.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Optimize-locking-a-tuple-already-locked-by-another-s.patch text/x-diff 3.8 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message y_r_wang 2015-06-20 05:47:10 BUG #13455: Start fair
Previous Message Jeff Frost 2015-06-19 15:49:33 Re: [GENERAL] pg_xlog on a hot_standby slave filling up