Re: Patch to improve performance of replay of AccessExclusiveLock

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndquadrant.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-03-22T14:39:57Z
Lists: pgsql-hackers
On 22 March 2017 at 13:19, David Rowley <david.rowley@2ndquadrant.com> wrote:

>> Given that, do you agree to me applying assign_aels_against_subxids.v1.patch
>> as well?
>
> Does applying assign_aels_against_subxids.v1.patch still need to keep
> the loop to release the subxacts? Won't this be gone already with the
> subxact commit/abort record replays?

No it is still required because aborts and commits might have
subcommitted subxids.

> This does possibly mean that we perform more loops over the
> RecoveryLockList even if the subxact does not have an AELs, but its
> parent xact does. Wonder if this is a good price to pay for releasing
> the locks earlier?

We'd be performing the same number of loops as we do now. It's just
now they would have a purpose.

But we aren't doing it at all unless the top level xid has at least
one AEL, so the bulk of the problem is gone.

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


Commits

  1. Move RecoveryLockList into a hash table.