Обсуждение: can postgres btree indexes shrink?

Поиск
Список
Период
Сортировка

can postgres btree indexes shrink?

От
Azad Bolour
Дата:

Does the postgres implementation of btrees shrink the index if adjacent index tree nodes can be combined? 

I have read that data pages are not coalesced, only garbage collected when they become empty. But I have not seen anything specific about the treatment of index pages as deletions make the tree more sparse.

Thanks.

Azad

Re: can postgres btree indexes shrink?

От
Alvaro Herrera
Дата:
Azad Bolour wrote:
> Does the postgres implementation of btrees shrink the index if adjacent
> index tree nodes can be combined?

No.  Completely empty pages are collected as free space for later use,
but partially-empty pages are not merged.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Re: can postgres btree indexes shrink?

От
Azad Bolour
Дата:

Thanks so much for the clarification.

Azad


On Wed, Jun 26, 2013 at 10:55 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Azad Bolour wrote:
> Does the postgres implementation of btrees shrink the index if adjacent
> index tree nodes can be combined?

No.  Completely empty pages are collected as free space for later use,
but partially-empty pages are not merged.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services