Opportunistically pruning page before update

Поиск
Список
Период
Сортировка
От James Coleman
Тема Opportunistically pruning page before update
Дата
Msg-id CAAaqYe_m2FrwtdSYpgeS-x7oBghsUSs8KUvJdm6S78_u7GJwxA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Opportunistically pruning page before update  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
Hello,

While at PGCon I was chatting with Andres (and I think Peter G. and a
few others who I can't remember at the moment, apologies) and Andres
noted that while we opportunistically prune a page when inserting a
tuple (before deciding we need a new page) we don't do the same for
updates.

Attached is a patch series to do the following:

0001: Make it possible to call heap_page_prune_opt already holding an
exclusive lock on the buffer.
0002: Opportunistically prune pages on update when the current tuple's
page has no free space. If this frees up enough space, then we
continue to put the new tuple on that page; if not, then we take the
existing code path and get a new page.

One would plausibly expect the following improvements:
- Reduced table bloat
- Increased HOT update rate
- Improved performance on updates

I started to work on benchmarking this, but haven't had time to devote
properly to that, so I'm wondering if there's anyone who might be
interested in collaborating on that part.

Other TODOs:
- Audit other callers of RelationSetTargetBlock() to ensure they don't
hold pointers into the page.

Regards,
James Coleman

Вложения

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

Предыдущее
От: James Coleman
Дата:
Сообщение: Re: Use of additional index columns in rows filtering
Следующее
От: Jelte Fennema
Дата:
Сообщение: Re: Support logical replication of DDLs