Re: [WIP PATCH] Index scan offset optimisation using visibility map - Mailing list pgsql-hackers

From Tels
Subject Re: [WIP PATCH] Index scan offset optimisation using visibility map
Date
Msg-id c8a2db49747ad87a32a9c9f68acf7bd7.squirrel@sm.webmail.pair.com
Whole thread Raw
In response to Re: [WIP PATCH] Index scan offset optimisation using visibility map  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Responses Re: [WIP PATCH] Index scan offset optimisation using visibility map  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-hackers
Hello Michail,

On Tue, March 6, 2018 4:03 pm, Michail Nikolaev wrote:
> Hello, Andrey.
>
> Thanks for review.
>
> I have updated comments according your review also renamed some fields for
> consistency.
> Additional some notes added to documentation.
>
> Updated patch in attach, github updated too.

That is a cool idea, and can come in very handy if you regulary need large
offsets. Cannot comment on the code, but there is at least one regular
typo:

+         * Decrement counter for remaning skipped tuples.
+         * If last tuple skipped - release the buffer.
+         */
+         if (node->iss_TuplesSkippedRemaning > 0)
+             node->iss_TuplesSkippedRemaning--;

The English word is "remaining", with "ai" instead of "a" :)

Also the variable name "iss_TuplesSkipped" has its grammar at odds with
the purpose the code seems to be.

It could be named "SkipTuples" (e.g. this is the number of tuples we need
to skip, not the number we have skipped), and the other one then
"iss_SkipTuplesRemaining" so they are consistent with each other.

Others might have a better name for these two, of course.

Best wishes,

Tels


pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative
Next
From: Peter Eisentraut
Date:
Subject: Re: Server won't start with fallback setting by initdb.