Re: Avoid full GIN index scan when possible
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, Marc Cousin <cousinmarc@gmail.com>,
Alexander Korotkov <a.korotkov@postgrespro.ru>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Nikita Glukhov <n.gluhov@postgrespro.ru>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-08-01T14:37:06Z
Lists: pgsql-hackers
Julien Rouhaud <rjuju123@gmail.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
Commits
-
Avoid full scan of GIN indexes when possible
- 4b754d6c16e1 13.0 landed