pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Michael Meskes <meskes@postgresql.org>
Cc: Boszormenyi Zoltan <zb@cybertec.at>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Bruce Momjian <bruce@momjian.us>
Subject: Re: ECPG FETCH readahead
Date: Mon, 5 Mar 2012 13:50:04 -0500
Message-ID: <20120305185004.GD13348@tornado.leadboat.com> (raw)
In-Reply-To: <20120304161606.GA4706@feivel.credativ.lan>
References: <201006232042.o5NKgb503695@momjian.us>
	<4C2308FD.1090300@cybertec.at>
	<4C231F9E.6000102@enterprisedb.com>
	<20100624121922.GD24137@feivel.credativ.lan>
	<AANLkTinij9ULnS54zKsdAJnhvuj-07-8-T-D=Nwk6f14@mail.gmail.com>
	<4CB6D3C8.3020709@cybertec.at>
	<4EC41434.7010603@cybertec.at>
	<4EFC36EF.1060308@cybertec.at>
	<20120302164105.GD23100@tornado.leadboat.com>
	<20120304161606.GA4706@feivel.credativ.lan>

On Sun, Mar 04, 2012 at 05:16:06PM +0100, Michael Meskes wrote:
> On Fri, Mar 02, 2012 at 11:41:05AM -0500, Noah Misch wrote:
> > I suggest enabling the feature by default but drastically reducing the default
> > readahead chunk size from 256 to, say, 5.  That still reduces the FETCH round
> > trip overhead by 80%, but it's small enough not to attract pathological
> > behavior on a workload where each row is a 10 MiB document.  I would not offer
> > an ecpg-time option to disable the feature per se.  Instead, let the user set
> > the default chunk size at ecpg time.  A setting of 1 effectively disables the
> > feature, though one could later re-enable it with ECPGFETCHSZ.
> 
> Using 1 to effectively disable the feature is fine with me, but I strongly
> object any default enabling this feature. It's farily easy to create cases with
> pathological behaviour and this features is not standard by any means. I figure
> a normal programmer would expect only one row being transfered when fetching
> one.

On further reflection, I agree with you here.  The prospect for queries that
call volatile functions changed my mind; they would exhibit different
functional behavior under readahead.  We mustn't silently give affected
programs different semantics.

Thanks,
nm



view thread (69+ messages)  latest in thread

Message-ID: <20120305185004.GD13348@tornado.leadboat.com>
Permalink:  ../20120305185004.GD13348@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20120305185004.GD13348@tornado.leadboat.com

 · 

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: noah@leadboat.com, meskes@postgresql.org, zb@cybertec.at, robertmhaas@gmail.com, heikki.linnakangas@enterprisedb.com, bruce@momjian.us
  Subject: Re: ECPG FETCH readahead
  In-Reply-To: <20120305185004.GD13348@tornado.leadboat.com>

* 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