Re: [HACKERS] [WIP] [B-Tree] Keep indexes sorted by heap physical location

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: [HACKERS] [WIP] [B-Tree] Keep indexes sorted by heap physical location
Дата
Msg-id CAGTBQpZriMOm0hoN=4bLdT_GrH_p-y_TarQfZ-pAMK=DpVu3cA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [WIP] [B-Tree] Keep indexes sorted by heap physical location  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: [HACKERS] [WIP] [B-Tree] Keep indexes sorted by heap physical location  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Mon, Jul 24, 2017 at 2:02 PM, Peter Geoghegan <pg@bowt.ie> wrote:
> On Mon, Jul 24, 2017 at 9:51 AM, Claudio Freire <klaussfreire@gmail.com> wrote:
>> My point was that the TID doesn't have to point to an actual tuple.
>>
>> It's more of a keyspace thing, so it doesn't need to match real
>> tuples, it can just divide the keyspace with an arbitrary cutoff, and
>> should be cheapter to maintain without that requirement.
>
> I agree, but unless you're using normalized keys, then I don't see
> that you get much useful leeway from using fake or truncated TID
> values. Presumably the comparison logic will be based on comparing an
> ItemPointerData field, which is impractical to truncate.

In most cases, the TID itself can be omitted when the key itself
differs already.

When a split happens, a TID will be added referring to a real tid from
a child page iff necessary.

This gives a lot of leeway in choosing the cutoff point, since a
cutoff point is only added when necessary.

Vacuum *might* be able to redistribute tuples too, while holding locks
to all 3 pages (the two children and the parent page), since it can
move the TID to the middle point of two actual child TIDs, mindlessly,
without checking to see if such TID actually exists - it just needs to
choose a TID cutoff point that will distribute item pointers evently.
I haven't tried this, but it is theoretically possible.



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

Предыдущее
От: Sokolov Yura
Дата:
Сообщение: Re: [HACKERS] Increase Vacuum ring buffer.
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: [HACKERS] Increase Vacuum ring buffer.