Re: Indirect indexes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Indirect indexes
Дата
Msg-id 20161019224548.lr3oy4pkaadeafvw@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Indirect indexes  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
Alexander Korotkov wrote:

Hi,

> Thank you for your proposal.  One question about vacuum excites me most.

> Imagine another situation: PK column was not updated, but indirect indexed
> column was updated.
> Thus, for single heap tuple we would have single PK tuple and two indirect
> index tuples (correct me if I'm wrong).
> How are we going to delete old indirect index tuple?

Yeah, this is a tough question all right.

Another thing to note is that the initial heap tuple might be removed
via HOT page pruning, so it will not be there during vacuuming either;
there would only be a redirect line pointer.  So I don't think we can
rely on that to figure out an exact cleanup of the indirect index.

One possibility is to forget about vacuuming the index altogether.
Instead we can rely solely on the killtuple interface, that is, have
obsolete tuples be removed during index scanning.

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



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Avoiding pin scan during btree vacuum
Следующее
От: Peter van Hardenberg
Дата:
Сообщение: Re: Patch: Implement failover on libpq connect level.