Re: SAVEPOINTs and COMMIT performance - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: SAVEPOINTs and COMMIT performance
Date
Msg-id 4DEC9EE1.8040802@enterprisedb.com
Whole thread Raw
In response to Re: SAVEPOINTs and COMMIT performance  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: SAVEPOINTs and COMMIT performance
Re: SAVEPOINTs and COMMIT performance
List pgsql-hackers
On 06.02.2011 23:09, Simon Riggs wrote:
> On Sun, 2011-02-06 at 12:11 -0500, Bruce Momjian wrote:
>> Did this ever get addressed?
>
> Patch attached.
>
> Seems like the easiest fix I can come up with.

> @@ -2518,7 +2518,7 @@ CommitTransactionCommand(void)
>          case TBLOCK_SUBEND:
>              do
>              {
> -                CommitSubTransaction();
> +                CommitSubTransaction(true);
>                  s = CurrentTransactionState;    /* changed by pop */
>              } while (s->blockState == TBLOCK_SUBEND);
>              /* If we had a COMMIT command, finish off the main xact too */

We also get into this codepath at RELEASE SAVEPOINT, in which case it is 
wrong to not reassign the locks to the parent subtransaction.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: BLOB support
Next
From: Simon Riggs
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch