Re: BUG #8470: 9.3 locking/subtransaction performance regression - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #8470: 9.3 locking/subtransaction performance regression
Date
Msg-id 20131220204753.GG22570@eldon.alvh.no-ip.org
Whole thread Raw
In response to BUG #8470: 9.3 locking/subtransaction performance regression  (os@ohmu.fi)
Responses Re: BUG #8470: 9.3 locking/subtransaction performance regression
List pgsql-bugs
> Removing the BEGIN/EXCEPTION/END block and just doing a 'SELECT FOR UPDATE'
> for a suitable row is significantly slower in 9.3.0 (314.765 ms vs 118.894
> ms on 9.2.4).  A 'SELECT' without a FOR UPDATE and BEGIN/EXCEPTION/END has
> the same performance on 9.2.4 and 9.3.0.

I have come up with the attached patch.  As far as I can tell it
restores performance roughly to the level of 9.2 for this test case;
could you please try it out and see if it fixes things for you?  It'd be
particularly good if you can check not only the test case you submitted
but also the one that made you explore this in the first place.

I haven't pushed it yet because I haven't yet convinced myself that this
is safe, but my intention is to do it shortly so that it will be in
9.3.3.

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

Attachment

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Next
From: Sergey Konoplev
Date:
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages