RE: btree split logic is fragile in the presence of large index items
| От | Hiroshi Inoue |
|---|---|
| Тема | RE: btree split logic is fragile in the presence of large index items |
| Дата | |
| Msg-id | 000801bff135$1a0d4060$2801007e@tpf.co.jp обсуждение исходный текст |
| Ответ на | Re: btree split logic is fragile in the presence of large index items (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
> -----Original Message-----
> From: pgsql-hackers-owner@hub.org [mailto:pgsql-hackers-owner@hub.org]On
> Behalf Of Tom Lane
>
> I've been chewing some more on the duplicate-key btree issue, and
> digging through CVS logs and Postgres v4.2 to try to understand the
> history of the code (and boy, this code does have a lot of history
> doesn't it?)
>
> One thing I'm still not too clear on is how we handle backwards
> indexscans. After looking at Lehman and Yao's paper it seems like
> only forward scans are guaranteed to work when other processes are
> busy splitting pages. Anybody know how that's handled?
>
There's the following comment for backwards scan in _bt_step()
in nbtsearch.c
/* * If the adjacent page just split,
thenwe may have * the wrong block. Handle this
case.
Because pages * only split right, we don't have
to wo
rry about this * failing to terminate.
*/
Seems backwards index scans sometimes move right(scan forward).
Regards.
Hiroshi Inoue
В списке pgsql-hackers по дате отправления: