Re: minor fix for acquire_inherited_sample_rows

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: minor fix for acquire_inherited_sample_rows
Дата
Msg-id 20180423151623.tdiezhphhztuhb5u@alvherre.pgsql
обсуждение исходный текст
Ответ на minor fix for acquire_inherited_sample_rows  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: minor fix for acquire_inherited_sample_rows  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Re: minor fix for acquire_inherited_sample_rows  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Hello Amit

Amit Langote wrote:

> acquire_inherited_sample_rows() currently uses equalTupleDescs() being
> false as the condition for going to tupconv.c to determine whether tuple
> conversion is needed.  But equalTupleDescs() will always return false if
> it's passed TupleDesc's of two different tables, which is the most common
> case here.  So I first thought we should just unconditionally go to
> tupconv.c, but there is still one case where we don't need to, which is
> the case where the child table is same as the parent table.  However, it
> would be much cheaper to just check if the relation OIDs are different
> instead of calling equalTupleDescs, which the attached patch teaches it to do.

When (not if) we get around to updating equalTupleDescs to cope, we will
need this call right where it is (and we'd have a hard time finding this
potential callsite later, I think).  If this were a hot spot I would be
happy to change it, but it's not so I'd rather leave it alone.

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


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: minor fix for CloneRowTriggersToPartition
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Oddity in tuple routing for foreign partitions