pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.
Date: 2011-07-19 16:22:31
Message-ID: E1QjD43-00083m-Tq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Remove O(N^2) performance issue with multiple SAVEPOINTs.
Subtransaction locks now released en masse at main commit, rather than
repeatedly re-scanning for locks as we ascend the nested transaction tree.
Split transaction state TBLOCK_SUBEND into two states, TBLOCK_SUBCOMMIT
and TBLOCK_SUBRELEASE to allow the commit path to be optimised using
the existing code in ResourceOwnerRelease() which appears to have been
intended for this usage, judging from comments therein.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7cb7122800ec996d4849ce9b4ad3065db19a2aae

Modified Files
--------------
src/backend/access/transam/xact.c | 102 +++++++++++++++++++++++++------------
1 files changed, 70 insertions(+), 32 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2011-07-19 16:58:44 pgsql: Add expected regress output on stricter isolation levels
Previous Message Robert Haas 2011-07-19 16:13:07 pgsql: Some refinement for the "fast path" lock patch.

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Caulfield 2011-07-19 16:22:55 Re: storing TZ along timestamps
Previous Message Kevin Grittner 2011-07-19 16:11:37 Re: storing TZ along timestamps