Re: Removing unneeded downlink field from nbtree stack struct - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Removing unneeded downlink field from nbtree stack struct
Date
Msg-id CAH2-WzkN+kep9gVSJXCqynoGxOaTjBYOoL_nFLD9AjTm+YkL5Q@mail.gmail.com
Whole thread Raw
In response to Re: Removing unneeded downlink field from nbtree stack struct  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
List pgsql-hackers
On Mon, Aug 12, 2019 at 9:43 AM Anastasia Lubennikova
<a.lubennikova@postgrespro.ru> wrote:
> The refactoring is clear, so I set Ready for committer status.
> I have just a couple of notes about comments:
>
> 1) I think that it's worth to add explanation of the case when we use
> right sibling to this comment:
> +                * stack to work back up to the parent page.  We use the
> child block
> +                * number (or possibly the block number of a page to its
> right)

That appears over _bt_getstackbuf().

> 2) It took me quite some time to understand why does page deletion case
> doesn't need a lock.
> I propose to add something like "For more see comments for
> _bt_lock_branch_parent()" to this line:

I ended up removing the reference to page deletion here (actually, I
removed the general discussion about the need to keep the child page
locked). This seemed like something that was really up to the callers.

Pushed a version with that change. Thanks for the review!

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: getting ERROR "relation 16401 has no triggers" with partition foreign key alter
Next
From: Alvaro Herrera
Date:
Subject: Re: getting ERROR "relation 16401 has no triggers" with partitionforeign key alter