pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: L J Bayuk <ljb220@mindspring.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: pgin.tcl pg_exec_prepared slow (was: Released...)
Date: Fri, 09 Jul 2004 20:07:56 -0400
Message-ID: <739.1089418076@sss.pgh.pa.us> (raw)
In-Reply-To: <20040708011244.GA331@bxlbisnugqvi.mindspring.com>
References: <24110.1087945736@sss.pgh.pa.us>
	<Pine.LNX.4.21.0406302310340.12226-100000@ponder.fairway2k.co.uk>
	<20040706010731.GA15183@bxlbisnugqvi.mindspring.com>
	<14766.1089081827@sss.pgh.pa.us>
	<20040708011244.GA331@bxlbisnugqvi.mindspring.com>

L J Bayuk <ljb220@mindspring.com> writes:
> I just haven't decided
> whether to flush before reading, or flush after all messages that need a
> response (I think: Startup, PasswordMessage, Query, Sync, CopyDone, and
> FunctionCall are the ones I use).

You seem to have quite missed my point.  If you decide to flush on the
basis of flush-after-certain-message-types-are-sent, then the types to
flush after are precisely Sync and Flush.  If you think you want
something different, you are wrong and should think again (or more
likely, insert Flush messages into the outgoing stream at the places
where you want a flush to occur).  There is no point in flushing after
any other message type because the backend won't flush its response.

Of course this is all moot if you choose to flush just before waiting
for input (though you'd still better be sure that Flush or Sync was the
last message sent before you do so).

> I could not find the described flush "when control returns to the main
> loop". Either I'm missing it, or it isn't there, and the comment implies
> that it may have been there at one time.

It's actually in ReadyForQuery() these days.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <739.1089418076@sss.pgh.pa.us>
Permalink:  ../739.1089418076@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/739.1089418076@sss.pgh.pa.us

 · 

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-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ljb220@mindspring.com
  Subject: Re: pgin.tcl pg_exec_prepared slow (was: Released...)
  In-Reply-To: <739.1089418076@sss.pgh.pa.us>

* 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