Re: [HACKERS] path toward faster partition pruning

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] path toward faster partition pruning
Дата
Msg-id 0f95f924-0efa-4cf5-eb5f-9a3d1bc3c33d@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] path toward faster partition pruning  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] path toward faster partition pruning
Re: [HACKERS] path toward faster partition pruning
Список pgsql-hackers
On 2018/02/28 1:05, Robert Haas wrote:
> On Mon, Feb 26, 2018 at 10:59 PM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> You may say that partition bounds might have to be different too in this
>> case and hence partition-wise join won't occur anyway, but I'm wondering
>> if the mismatch of partcollation itself isn't enough to conclude that?
> 
> Yeah, you're right.  I think that this is just a bug in partition-wise
> join, and that the partition scheme should just be using partcollation
> instead of parttypcoll, as in the attached.

Ah, OK. I was missing that there is no need to have both parttypcoll and
partcollation in PartitionSchemeData, as the Vars in rel->partexprs are
built from a bare PartitionKey (not PartitionSchemeData), and after that
point, parttypcoll no longer needs to kept around.

I noticed that there is a typo in the patch.

+    memcpy(part_scheme->partcollation, partkey->parttypcoll,

s/parttypcoll/partcollation/g

BTW, should there be a relevant test in partition_join.sql?  If yes,
attached a patch (partitionwise-join-collation-test-1.patch) to add one.

Also attached updated version of your patch (fixed the typo).

Thanks,
Amit

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Let's remove DSM_INPL_NONE.
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Online enabling of checksums