Stating the significance of Lehman & Yao in the nbtree README
От | Peter Geoghegan |
---|---|
Тема | Stating the significance of Lehman & Yao in the nbtree README |
Дата | |
Msg-id | CAM3SWZShmpRtQQY3MHHZkuc16LvO8HDCOx+Tu3kKsYF7x74g1g@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Stating the significance of Lehman & Yao in the nbtree README
Re: Stating the significance of Lehman & Yao in the nbtree README |
Список | pgsql-hackers |
While talking to various people during pgCon, I was reminded that the nbtree README does a poor job of explaining the actual practical advantages of L&Y from a high level. The "move right" trick is initially mentioned only as an adjunct to a discussion of the special-case handling of root page splits, even though it's of huge significance. We also say this within nbtinsert.c: /* * If the page was split between the time that we surrendered our read * lock and acquired our write lock, then this page may no longer be the * right place for the key we want to insert. In this case, we need to * move right in the tree. See Lehman and Yao for an excruciatingly * precise description. */ (Why we need to say something about _bt_moveright() within _bt_doinsert() that is equally true of both _bt_moveright() callers isn't clear). I think that this isn't enough. Attached patch proposes to add a small paragraph at the top of the nbtree README, to clarify the advantages of L&Y from a high level. I don't think it's appropriate to state the advantages of an algorithm in a README file generally, but in this instance it makes it easier to understand the algorithm. -- Peter Geoghegan
Вложения
В списке pgsql-hackers по дате отправления: