Re: Patch to improve performance of replay of AccessExclusiveLock

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to improve performance of replay of AccessExclusiveLock
Date: 2017-03-07 12:13:48
Message-ID: CANP8+jJPMWN8kXd3v24N7fu+qc9B_VHOTKRue6A5Xyb1cvVLEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 March 2017 at 19:22, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> wrote:

>>> That may need tweaking. Likely it could be smaller if we had some sort
>>> of bloom filter to mark if the transaction had obtained any AEL locks,
>>> that way it could skip. Initially I really didn't want to make the
>>> patch too complex. I had thought that a fairly large hash table would
>>> fix the problem well enough, as quite possibly most buckets would be
>>> empty and non empty buckets have short lists.
>>
>> ISTM that we should mark each COMMIT if it has an AEL, so we can avoid
>> any overhead in the common case.
>>
>> So an additional sub-record for the commit/abort wal record, via
>> include/access/xact.h
>
> That would be ideal if we could do that, but doing that for so many
> possible transaction IDs seems impractical.

Don't understand this. I'm talking about setting a flag on
commit/abort WAL records, like the attached.

We just need to track info so we can set the flag at EOXact and we're done.

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

Attachment Content-Type Size
partial.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2017-03-07 12:14:35 Re: foreign partition DDL regression tests
Previous Message Ivan Kartyshov 2017-03-07 11:48:21 Re: make async slave to wait for lsn to be replayed