pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Justify nbtree page split locking in code comment.
Date: Fri, 27 Mar 2020 23:46:18 +0000
Message-ID: <E1jHyg6-0003KF-7G@gemulon.postgresql.org> (raw)

Justify nbtree page split locking in code comment.

Delaying unlocking the right child page until after the point that the
left child's parent page has been refound is no longer truly necessary.
Commit 40dae7ec made nbtree tolerant of interrupted page splits.  VACUUM
was taught to avoid deleting a page that happens to be the right half of
an incomplete split.  As long as page splits don't unlock the left child
page until the end of the second/final phase, it should be safe to
unlock the right child page earlier (at the end of the first phase).

It probably isn't actually useful to release the right child's lock
earlier like this (it probably won't improve performance).  Even still,
pointing out that it ought to be safe to do so should make it easier to
understand the overall design.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9945ad6e904041be1567a89916ddc64087ed1edc

Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)



Message-ID: <E1jHyg6-0003KF-7G@gemulon.postgresql.org>
Permalink:  ../E1jHyg6-0003KF-7G@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jHyg6-0003KF-7G@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: pg@bowt.ie
  Subject: Re: pgsql: Justify nbtree page split locking in code comment.
  In-Reply-To: <E1jHyg6-0003KF-7G@gemulon.postgresql.org>
  References: <E1jHyg6-0003KF-7G@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