Re: Avoid full GIN index scan when possible

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 03:03:41
Message-ID: CAPpHfdtW5inx6a=WRgqHVeE6S74XBf1mJGFSoJ2SMwLz_T_WaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Updated patch is attached. It contains more comments as well as commit message.

On Sun, Jan 12, 2020 at 12:10 AM Alexander Korotkov
<a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> On Sat, Jan 11, 2020 at 3:19 PM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> > While at it, IIUC only excludeOnly key can have nrequired == 0 (if
> > that's the case, this could be explicitly said in startScanKey
> > relevant comment), so it'd be more consistent to also use excludeOnly
> > rather than nrequired in this assert?
>
> Make sense. I'll adjust the assert as well as comment.

The changes to this assertion are not actually needed. I just
accidentally forgot to revert them.

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

Attachment Content-Type Size
0001-Avoid-GIN-full-scan-for-empty-ALL-keys-v12.patch application/octet-stream 31.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-01-14 03:49:32 Re: Protect syscache from bloating with negative cache entries
Previous Message David Z 2020-01-14 02:39:15 Re: Making psql error out on output failures