Re: Covering GiST indexes

От: Andrey Borodin
Тема: Re: Covering GiST indexes
Дата: ,
Msg-id: DEEAE73C-F75D-48BD-BA4C-B0CA118F48FA@yandex-team.ru
(см: обсуждение, исходный текст)
Ответ на: Re: Covering GiST indexes  (Andreas Karlsson)
Ответы: Re: Covering GiST indexes  (Andreas Karlsson)
Список: pgsql-hackers

Скрыть дерево обсуждения

Covering GiST indexes  (Andrey Borodin, )
 Re: Covering GiST indexes  (Teodor Sigaev, )
  Re: Covering GiST indexes  (Aleksander Alekseev, )
  Re: Covering GiST indexes  (Andrey Borodin, )
   Re: Covering GiST indexes  (Andrey Borodin, )
    Re: Covering GiST indexes  (Thomas Munro, )
     Re: Covering GiST indexes  (Andrey Borodin, )
      Re: Covering GiST indexes  (Thomas Munro, )
       Re: Covering GiST indexes  (Andrey Borodin, )
        Re: Covering GiST indexes  (Dmitry Dolgov, )
         Re: Covering GiST indexes  (Andrey Borodin, )
          Re: Covering GiST indexes  (Andreas Karlsson, )
           Re: Covering GiST indexes  (Andrey Borodin, )
            Re: Covering GiST indexes  (Andreas Karlsson, )
             Re: Covering GiST indexes  (Andrey Borodin, )
              Re: Covering GiST indexes  (Andreas Karlsson, )
               Re: Covering GiST indexes  (Andreas Karlsson, )
               Re: Covering GiST indexes  (Andrey Borodin, )
                Re: Covering GiST indexes  (Andreas Karlsson, )
                 Re: Covering GiST indexes  (Andrey Borodin, )
                  Re: Covering GiST indexes  (Andreas Karlsson, )
                   Re: Covering GiST indexes  (Alexander Korotkov, )
                    Re: Covering GiST indexes  (Alexander Korotkov, )
                     Re: Covering GiST indexes  (Andrey Borodin, )
 Re: Covering GiST indexes  (Alexander Korotkov, )
  Re: Covering GiST indexes  (Darafei "Komяpa" Praliaskouski, )
   Re: Covering GiST indexes  (Alexander Korotkov, )
 Re: Covering GiST indexes  (Peter Geoghegan, )


> 29 янв. 2019 г., в 7:32, Andreas Karlsson <> написал(а):
>
> On 1/28/19 7:26 PM, Andrey Borodin wrote:
>>> * I am no fan of the tupdesc vs truncTupdesc separation and think that it is a potential hazard, but I do not have
anybetter suggestion right now. 
>> B-tree is copying tupdesc every time they truncate tuple. We need tuple truncation a little more often: when we are
doingpage split, we have to form all page tuples, truncated. 
>> Initially, I've optimized only this case, but this led to prepared tupledesc for truncated tuples.
>>>
>>> * There is no test case for exclusion constraints, and I feel since that is one of the more important uses we
shouldprobably have at least one such test case. 
>> Actually, I did not understand this test case. Can you elaborate more on this? How included attributes should
participatein exclude index? What for? 
>
> I mean include a table like below among the tests. I feel like this is a main use case for INCLUDE.
>
> CREATE TABLE t2 (
>  x int4range,
>  y int,
>
>  EXCLUDE USING gist (x WITH &&) INCLUDE (y)
> );

Thanks for the explanation. Added this as case 6 to index_including_gist.

>>> * Why the random noise in the diff below? I think using "(c3) INCLUDE (c4)" for both gist and rtree results in a
cleanerpatch. 
>> I've used columns with and without opclass in INCLUDE. This led to these seemingly random changes.
>
> I mean the diff would be smaller as the below. It also may make sense to make both lines "(c3) INCLUDE (c1, c4)".
>
> CREATE TABLE tbl (c1 int,c2 int, c3 box, c4 box);
> CREATE INDEX on tbl USING brin(c1, c2) INCLUDE (c3, c4);
> CREATE INDEX on tbl USING gist(c3) INCLUDE (c4);
> CREATE INDEX on tbl USING spgist(c3) INCLUDE (c4);
> CREATE INDEX on tbl USING gin(c1, c2) INCLUDE (c3, c4);
> CREATE INDEX on tbl USING hash(c1, c2) INCLUDE (c3, c4);
> -CREATE INDEX on tbl USING rtree(c1, c2) INCLUDE (c3, c4);
> +CREATE INDEX on tbl USING rtree(c3) INCLUDE (c4);
> CREATE INDEX on tbl USING btree(c1, c2) INCLUDE (c3, c4);
>

I've took your version of this test and added all variations of included attributes.


PFA v7.

Thanks!

Best regards, Andrey Borodin.


Вложения

В списке pgsql-hackers по дате сообщения:

От: Michael Paquier
Дата:
Сообщение: Re: pg_basebackup, walreceiver and wal_sender_timeout
От: Oleksii Kliukin
Дата:
Сообщение: Re: pg_basebackup, walreceiver and wal_sender_timeout