Re: Feature request for adoptive indexes

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Feature request for adoptive indexes
Дата
Msg-id CAH2-Wz=22epJjPp9Z+FaZt2Q+cVTDMr6EvGf8eOLrmFFjq-1Dg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Feature request for adoptive indexes  (Pavel Borisov <pashkin.elfe@gmail.com>)
Ответы Re: Feature request for adoptive indexes
Список pgsql-hackers
On Wed, Oct 27, 2021 at 1:02 AM Pavel Borisov <pashkin.elfe@gmail.com> wrote:
> AFAIK Gin is lossy for phrase queries as we don't store word position in the posting list. For purely logical
queries,where position doesn't matter, it's not lossy.
 

GIN is always lossy, in the sense that it provides only a
gingetbitmap() routine -- there is no gingettuple() routine. I believe
that this is fundamental to the overall design of GIN. It would be
very difficult to add useful gingettuple() functionality now, since
GIN already relies on lossiness to avoid race conditions.

Here's an example of the problems that "adding gingettuple()" would
run into: Today, an index's pending list entries can be merged
concurrently with the entry tree, without worrying about returning the
same tuples twice. This is only safe/correct because GIN only supports
bitmap index scans. Without that, you need some other mechanism to
make it safe -- ISTM you must "logically lock" the index structure,
using ARIES/KVL style key value locks, or something along those lines.

-- 
Peter Geoghegan



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

Предыдущее
От: Gilles Darold
Дата:
Сообщение: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: allowing "map" for password auth methods with clientcert=verify-full