Re: minor fix for acquire_inherited_sample_rows

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: minor fix for acquire_inherited_sample_rows
Дата
Msg-id 981c7ee3-26c2-add6-8fc3-5451e4bbea29@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: minor fix for acquire_inherited_sample_rows  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список pgsql-hackers
On 2018/04/24 13:29, Ashutosh Bapat wrote:
> On Mon, Apr 23, 2018 at 6:45 PM, Amit Langote <amitlangote09@gmail.com> wrote:
>> On Mon, Apr 23, 2018 at 8:25 PM, Ashutosh Bapat wrote:
>>> On Mon, Apr 23, 2018 at 3:44 PM, Amit Langote wrote:
>>>> Hi.
>>>>
>>>> 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.
>>>
>>> We want to check whether tuple conversion is needed. Theoretically
>>> (not necessarily practically), one could have tuple descs of two
>>> different tables stamped with the same tdtypeid. From that POV,
>>> equalTupleDescs seems to be a stronger check than what you have in the
>>> patch.
>>
>> If I'm reading right, that sounds like a +1 to the patch. :)
> 
> Not really! To make things clear, I am not in favour of this patch.

Oh okay.  I read your last sentence as "equalTupleDescs() seems to be a
stronger check than needed" (which is how I see it), but apparently that's
not what you meant to say.  Anyway, thanks for clarifying.

Regards,
Amit



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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: minor fix for acquire_inherited_sample_rows
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Local partitioned indexes and pageinspect