pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move RecoveryLockList into a hash table.
Date: Tue, 26 Jun 2018 07:12:44 +0000
Message-ID: <E1fXi9c-0004yZ-B5@gemulon.postgresql.org> (raw)

Move RecoveryLockList into a hash table.

Standbys frequently need to release all locks held by a given xid.
Instead of searching one big list linearly, let's create one list
per xid and put them in a hash table, so we can find what we need
in O(1) time.

Earlier analysis and a prototype were done by David Rowley, though
this isn't his patch.

Back-patch all the way.

Author: Thomas Munro
Diagnosed-by: David Rowley, Andres Freund
Reviewed-by: Andres Freund, Tom Lane, Robert Haas
Discussion: https://postgr.es/m/CAEepm%3D1mL0KiQ2KJ4yuPpLGX94a4Ns_W6TL4EGRouxWibu56pA%40mail.gmail.com
Discussion: https://postgr.es/m/CAKJS1f9vJ841HY%3DwonnLVbfkTWGYWdPN72VMxnArcGCjF3SywA%40mail.gmail.com

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/12f7d91994d15d362384be46eec92498bdc001c6

Modified Files
--------------
src/backend/storage/ipc/standby.c | 165 ++++++++++++++++++++------------------
1 file changed, 88 insertions(+), 77 deletions(-)



view thread (6+ messages)

Message-ID: <E1fXi9c-0004yZ-B5@gemulon.postgresql.org>
Permalink:  ../E1fXi9c-0004yZ-B5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fXi9c-0004yZ-B5@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Move RecoveryLockList into a hash table.
  In-Reply-To: <E1fXi9c-0004yZ-B5@gemulon.postgresql.org>
  References: <E1fXi9c-0004yZ-B5@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox