From: | Antonin Houska <antonin(dot)houska(at)gmail(dot)com> |
---|---|
To: | Boszormenyi Zoltan <zboszor(at)pr(dot)hu>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Michael Meskes <meskes(at)postgresql(dot)org>, Noah Misch <noah(at)leadboat(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at> |
Subject: | Re: Review: ECPG FETCH readahead |
Date: | 2014-04-23 22:06:48 |
Message-ID: | 53583978.1070100@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
[Now I'm only replying where my explanation seems useful. If you expect
anything else, please remind me.]
On 04/23/2014 06:41 PM, Boszormenyi Zoltan wrote:
>
> All exported ECPG functions returns bool. IIRC the code generated by
> "EXEC SQL WHENEVER <something-else-than-CONTINUE>" makes use
> of the returned value.
ok
>>
>> 26.patch (the READAHEAD feature itself)
>> ---------------------------------------
>> Maybe just the arguments and return value of
>> the ecpglib functinons (ECPGopen, ECPGopen, ECPGfetch, ...) deserve a
>> bit more attention.
>
> What do you mean exactly?
Basically the missing description of return type was most blatant, but
you explained it above. Now that I see some of the existing library
functions, the descriptions of parameters are neither too eloquent. So
ignore this remark.
>>
>> * sql-cursor-ra-fetch.stderr
>>
>> [NO_PID]: ecpg_execute on line 169: query: move forward all in
>> scroll_cur; with 0 parameter(s) on connection regress1
>> ...
>> [NO_PID]: ecpg_execute on line 169: query: move relative -3 in
>> scroll_cur; with 0 parameter(s) on
>>
>> As the first iteration is special anyway, wouldn't "move absolute -3" be
>> more efficient than the existing 2 commands?
>
> The caching code tries to do the correct thing whichever direction
> the cursor is scanned. AFAIR this one explicitly tests invalidating
> the readahead window if you fall off it by using MOVE FORWARD ALL.
I have no doubt about correctness of the logic, just suspect that a
single MOVE command could do the action. Perhaps consider it my paranoia
and let committer judge if it's worth a change (especially if the
related amount of coding would seem inadequate).
>>
>> Other
>> -----
>>
>> Besides the individual parts I propose some typo fixes and
>> improvements in wording:
>>
>>
>> * doc/src/sgml/ecpg.sgml
In general, I'm not English native speaker, can be wrong in some cases.
Just pointed out what I thought is worth checking.
// Tony
From | Date | Subject | |
---|---|---|---|
Next Message | Antonin Houska | 2014-04-23 22:15:41 | Re: Review: ECPG FETCH readahead |
Previous Message | Bruce Momjian *EXTERN* | 2014-04-23 21:39:29 | All caught up |