Re: unnecessary code in_bt_split

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: unnecessary code in_bt_split
Дата
Msg-id
15674.1217807073@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
unnecessary code in_bt_split Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Re: unnecessary code in_bt_split Tom Lane <tgl@sss.pgh.pa.us>
Re: unnecessary code in_bt_split Simon Riggs <simon@2ndquadrant.com>
Re: unnecessary code in_bt_split Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Re: unnecessary code in_bt_split Tom Lane <tgl@sss.pgh.pa.us>
Re: unnecessary code in_bt_split Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Zdenek Kotala  writes:
> I found that _bt_split function calls PageGetTempPage, but next call is 
> _bt_page_init which clear all contents anyway. Is there any reason to call 
> PageGetTempPage instead of palloc?

Not violating a perfectly good abstraction?

I agree that PageGetTempPage isn't amazingly efficient, but internal
refactoring would halve its cost; and if you have some evidence that
there's a real performance issue then we could think about adjusting
the temp-page API to allow _bt_pageinit to be combined with it.  But
I have a real problem with hacking up _bt_split so that it will call
PageRestoreTempPage on something it didn't get from PageGetTempPage.

Considering the WAL and regular I/O that will be induced by a split,
I kinda doubt this is even worth worrying about anyway...
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Zdenek Kotala
Дата:
Сообщение: unnecessary code in_bt_split
От: Josh Berkus
Дата:
FAQ