Re: Should the nbtree page split REDO routine's locking work more like the locking on the primary?

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: Should the nbtree page split REDO routine's locking work more like the locking on the primary?
Date: 2020-08-07 22:28:46
Message-ID: CAH2-Wz=ukRBOFjTkmHJGBr9zzHaSwfYP4_JN6R3mq2=SFv5MYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 6, 2020 at 7:00 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Thu, Aug 6, 2020 at 6:08 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > +1 for making this more like what happens in original execution ("on the
> > primary", to use your wording). Perhaps what you suggest here is still
> > not enough like the original execution, but it sounds closer.
>
> It won't be the same as the original execution, exactly -- I am only
> thinking of holding on to same-level page locks (the original page,
> its new right sibling, and the original right sibling).

I pushed a commit that reorders the lock acquisitions within
btree_xlog_unlink_page() -- they're now consistent with _bt_split()
(at least among sibling pages involved in the page split).

Thanks
--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-08-07 22:55:12 Re: walsender waiting_for_ping spuriously set
Previous Message Andres Freund 2020-08-07 21:37:27 Re: PROC_IN_ANALYZE stillborn 13 years ago