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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: os(at)ohmu(dot)fi, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8470: 9.3 locking/subtransaction performance regression
Date: 2013-12-31 20:27:53
Message-ID: 20131231202753.GY22570@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera wrote:

> > What's the test coverage for these cases? It better be 110%...
>
> 110% is rather hard to achieve, particularly because of the cases
> involving crashed transactions. Other than that I think I tested all
> those paths. I will go through it again.

Actually, there was a nasty bug in that formulation of the patch; in
heap_lock_tuple I mixed the "is multi" case in with the "do we own a
lock" check, which are completely unrelated and cause a number of
regressions in isolation tests. Here's a reworked version. I removed
those new labels and gotos; seems better this way.

Note there are some new blocks that need to be reflowed and pgindented;
also the diff contain some spurious whitespace changes that are undoing
some pgindent decisions. There are also some spurious changes which
have to do with a later patch I have -- the one that optimizes for
LOCK_ONLY multis. I tried to avoid including unnecessary whitespace
changes so that the actual code changes are easier to spot, but if I was
to remove them all I wouldn't have been able to submit the patch this
year, so please bear with me.

I generated the "make coverage" report after having run initdb, the
isolation tests and the regular regression tests; it shows almost all
the interesting paths here are being taken. (There are only a couple of
cases not being tested in compute_new_xmax_infomask, but they are
simpler ones. I will see about modifying one of the existing isolation
tests to cover those cases as well.)

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

Attachment Content-Type Size
multixact-optimize.patch text/x-diff 18.6 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message digoal 2014-01-01 08:22:34 Re: BUG #8710: dblink dblink_get_pkey output bug, and dblink_build_sql_update bug
Previous Message Alvaro Herrera 2013-12-31 16:34:19 Re: BUG #8470: 9.3 locking/subtransaction performance regression