Re: Avoid full GIN index scan when possible

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Marc Cousin <cousinmarc(at)gmail(dot)com>
Subject: Re: Avoid full GIN index scan when possible
Date: 2020-01-14 22:56:47
Message-ID: CAPpHfdtvW-jdRjJuiUHhG1GjXc4VianKoxHMzPXb203FKiW+kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 15, 2020 at 1:47 AM Alexander Korotkov
<a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> I also had concerns about how excludeOnly keys work with lossy pages.
> I didn't find exact error. But I've added code, which skips
> excludeOnly keys checks for lossy pages. They aren't going to exclude
> any lossy page anyway. So, we can save some resources by skipping
> this.

I also found the way we combine lossy pages and exact TIDs pretty
asymmetric. Imagine one scan key A matches a lossy page, while
another key B have set of matching TIDs on the same page. If key A
goes first, we will report a lossy page. But if key B goes first, we
will report a set of TIDs with recheck set. It would be nice to
improve. But this is definitely subject of a separate patch.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-01-14 23:03:39 Re: Avoid full GIN index scan when possible
Previous Message Tom Lane 2020-01-14 22:54:16 Re: aggregate crash