Re: Bulk inserts and usage_count

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Bulk inserts and usage_count
Дата
Msg-id 20070515231548.GZ20707@nasby.net
обсуждение исходный текст
Ответ на Bulk inserts and usage_count  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
On Tue, May 15, 2007 at 04:37:28PM +0100, Heikki Linnakangas wrote:
> While testing the buffer ring patch, I noticed that bulk inserts with 
> both INSERT and COPY pin and unpin the buffer they insert to for every 
> tuple. That means that the usage_count of all those buffers are bumped 
<snip> 
> A fix for COPY will fall naturally out of the buffer ring patch, but not 
> for INSERT.
> 
> A more general fix would be to somehow keep the last insertion page 
> pinned across calls to heap_insert.

ISTR discussion in the past about having things like COPY and INSERT
INTO ... SELECT building entire pages in one shot once they exhaust the
FSM. Not only would it address this issue, but it would probably improve
performance in many ways (less locking and unlocking, ability to
pre-sort before inserting into indexes, fewer calls to FSM, probably a
bunch of other things).
-- 
Jim Nasby                                      decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Not ready for 8.3
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Not ready for 8.3