Re: _bt_split(), and the risk of OOM before its critical section - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: _bt_split(), and the risk of OOM before its critical section
Date
Msg-id CAH2-Wz=gdhhMXcsWXWPS=TjCsK_A4BkPmHmo0-A0JE0+4tG42w@mail.gmail.com
Whole thread Raw
In response to Re: _bt_split(), and the risk of OOM before its critical section  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Wed, May 8, 2019 at 3:37 PM Peter Geoghegan <pg@bowt.ie> wrote:
> It makes perfect sense for _bt_split() to call _bt_findsplitloc()
> directly, since _bt_findsplitloc() is already aware of almost every
> _bt_split() implementation detail, whereas those same details are not
> of interest anywhere else.

I discovered that it even used to work like that until 1997, when
commit 71b3e93c505 added handling of duplicate index tuples. Tom
ripped the duplicate handling stuff out a couple of years later, for
what seemed to me to be very good reasons, but _bt_findsplitloc()
remained outside of _bt_split() until now.

I intend to push ahead with the fix for both v11 and HEAD on Monday.
-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unexpected "shared memory block is still in use"
Next
From: Tom Lane
Date:
Subject: Re: Unexpected "shared memory block is still in use"