Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id F1307189E835; Tue, 10 Apr 2012 04:36:34 -0300 (ADT) Received: from [87.118.86.135] (helo=km31432.keymachine.de) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHVcv-0004pq-1z; Tue, 10 Apr 2012 07:36:34 +0000 Received: from localhost.localdomain (unknown [87.242.62.156]) by km31432.keymachine.de (Postfix) with ESMTPSA id E21743900125; Tue, 10 Apr 2012 07:42:23 +0000 (UTC) Message-ID: <4F83E2B9.3030302@cybertec.at> Date: Tue, 10 Apr 2012 09:35:21 +0200 From: Boszormenyi Zoltan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Noah Misch , Michael Meskes , Robert Haas , PG Hackers , Heikki Linnakangas , Bruce Momjian Subject: Re: ECPG FETCH readahead References: <4F6D9893.3030300@cybertec.at> <20120329004323.GA17329@tornado.leadboat.com> <4F74409C.3050904@cybertec.at> <20120329170341.GA4142@tornado.leadboat.com> <4F74E6A7.8040204@cybertec.at> <20120407112008.GA2286@feivel.credativ.lan> <20120407155042.GB11987@tornado.leadboat.com> <20120408142501.GA21513@feivel.credativ.lan> <4F81BE55.1010904@cybertec.at> <20120408173859.GA4915@feivel.credativ.lan> In-Reply-To: <20120408173859.GA4915@feivel.credativ.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 87.118.86.135 (deferred) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201204/445 X-Sequence-Number: 206248 2012-04-08 19:38 keltez=C3=A9ssel, Michael Meskes =C3=ADrta: > On Sun, Apr 08, 2012 at 06:35:33PM +0200, Boszormenyi Zoltan wrote: >> Do you want me to change this or will you do it? I am on holiday >> and will be back to work on wednesday. > I don't think waiting till later this week is a real problem. OK. > >> The possibility to test different readahead window sizes >> without modifying the source and recompiling was useful. > Sure, but you can still do that when not defining a fixed number in the > statement. OK. > >> The -R option simply provides a default without ornamenting >> the DECLARE statement. > Could you please incorporate these changes, too, when you're back from = vacation? Sure. So, it's established that a specified READAHEAD N should not be overridden. Even an explicit READAHEAD 1. Only a non-decorated cursor can be overridden, even if a different default readahead window size is specified with e.g. "ecpg -R 8". If ECPGFETCHSZ is not present, 8 will be used, if ECPGFETCHSZ is present, its value will be used. ECPGopen() will need an extra bool argument to distinguish this. Is this acceptable? Noah, Michael? > >>> I cannot find a test that tests the environment variable giving the f= etch size. >>> Could you please point me to that? >> I didn't write such a test. The reason is that while variables are >> exported by make from the Makefile to the binaries run by make >> e.g. CFLAGS et.al. for $(CC), "make check" simply runs pg_regress >> once which uses its own configuration file that doesn't have a >> way to set or unset an environment variable. This could be a useful >> extension to pg_regress though. > How about calling setenv() from the test program itself? Sure, I didn't think about it. It should be done before the first EXEC SQL OPEN cursor. Best regards, Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi --=20 ---------------------------------- Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi Cybertec Sch=C3=B6nig& Sch=C3=B6nig GmbH Gr=C3=B6hrm=C3=BChlgasse 26 A-2700 Wiener Neustadt, Austria Web: http://www.postgresql-support.de http://www.postgresql.at/