pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Boszormenyi Zoltan <zb@cybertec.at>
To: Noah Misch <noah@leadboat.com>
To: Michael Meskes <meskes@postgresql.org>
To: Robert Haas <robertmhaas@gmail.com>
To: PG Hackers <pgsql-hackers@postgresql.org>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Bruce Momjian <bruce@momjian.us>
Subject: Re: ECPG FETCH readahead
Date: Tue, 10 Apr 2012 09:35:21 +0200
Message-ID: <4F83E2B9.3030302@cybertec.at> (raw)
In-Reply-To: <20120408173859.GA4915@feivel.credativ.lan>
References: <CA+TgmoaBGLpW5V3nFES-McLbZyY_9nUvpnFLjT7zAYuVPu809A@mail.gmail.com>
	<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>

2012-04-08 19:38 keltezéssel, Michael Meskes írta:
> 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 fetch 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án Böszörményi

-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig&  Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
      http://www.postgresql.at/




view thread (69+ messages)  latest in thread

Message-ID: <4F83E2B9.3030302@cybertec.at>
Permalink:  ../4F83E2B9.3030302@cybertec.at/
Also on:    postgresql.org/message-id/4F83E2B9.3030302@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: zb@cybertec.at, noah@leadboat.com, meskes@postgresql.org, robertmhaas@gmail.com, heikki.linnakangas@enterprisedb.com, bruce@momjian.us
  Subject: Re: ECPG FETCH readahead
  In-Reply-To: <4F83E2B9.3030302@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox