Re: [RFC] indirect toast tuple support

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [RFC] indirect toast tuple support
Дата
Msg-id CAM-w4HOfzsSyiu7r_zWUFDBTdJzV9ePJYiRRouJ9hNavRPpzGw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [RFC] indirect toast tuple support  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: [RFC] indirect toast tuple support  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
On Tue, Feb 19, 2013 at 2:00 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> The only reasonable thing I can see us doing is renaming
> varattrib_1b_e.va_len_1be into va_type and redefine VARSIZE_1B_E into a
> switch that maps types into lengths. But I think I would put this off,
> except placing a comment somewhere, until its gets necessary.

Is there any reason to make it a switch before we actually have two
types that happen to have the same length?

It might make the code clearer if there was an enum with the (one)
type listed but as long as all the enum values happen to have the
value of the length of the struct then it makes heap_form_tuple and
heap_deform_tuple marginally faster. (unless gcc can optimize away the
whole switch statement which might be plausible, especially if it's
just a few ?: expressions)

-- 
greg



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

Предыдущее
От: Daniel Farina
Дата:
Сообщение: Re: Unarchived WALs deleted after crash
Следующее
От: Greg Stark
Дата:
Сообщение: Re: [RFC] indirect toast tuple support