Re: [WIP PATCH] Index scan offset optimisation using visibility map

From: "Tels" <nospam-pg-abuse(at)bloodgate(dot)com>
To: "Michail Nikolaev" <michail(dot)nikolaev(at)gmail(dot)com>
Cc: "Andrey Borodin" <x4mmm(at)yandex-team(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [WIP PATCH] Index scan offset optimisation using visibility map
Date: 2018-03-06 22:25:48
Message-ID: c8a2db49747ad87a32a9c9f68acf7bd7.squirrel@sm.webmail.pair.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-03-06 22:42:44 Re: Server won't start with fallback setting by initdb.
Previous Message Daniel Gustafsson 2018-03-06 22:18:09 Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative