Re: Avoid full GIN index scan when possible

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Marc Cousin <cousinmarc(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, 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>
Subject: Re: Avoid full GIN index scan when possible
Date: 2019-08-01 14:37:06
Message-ID: 12611.1564670226@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> Attached v4 that should address all comments.

Eyeing this a bit further ... doesn't scanPendingInsert also need
to honor so->forcedRecheck? Something along the lines of

- tbm_add_tuples(tbm, &pos.item, 1, recheck);
+ tbm_add_tuples(tbm, &pos.item, 1, recheck | so->forcedRecheck);

at line 1837? (Obviously, there's more than one way you could
write that.)

I'm also not exactly satisfied with the new comments --- they aren't
conveying much, and the XXX in one of them is confusing; does that
mean you're unsure that the comment is correct?

The added test case seems a bit unsatisfying as well, in that it
fails to retrieve any rows. It's not very clear what it's
trying to test.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2019-08-01 14:42:35 Re: Multivariate MCV list vs. statistics target
Previous Message Tom Lane 2019-08-01 14:14:54 Re: Partial join