Re: pgin.tcl pg_exec_prepared slow (was: Released...)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgin.tcl pg_exec_prepared slow (was: Released...)
Дата
Msg-id 739.1089418076@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgin.tcl pg_exec_prepared slow (was: Released...)  (L J Bayuk <ljb220@mindspring.com>)
Ответы Re: pgin.tcl pg_exec_prepared slow (was: Released...)  (L J Bayuk <ljb220@mindspring.com>)
Список pgsql-interfaces
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


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Jim Buttafuoco"
Дата:
Сообщение: Re: [Fwd: typlen field in the pg_type table]
Следующее
От: L J Bayuk
Дата:
Сообщение: Re: pgin.tcl pg_exec_prepared slow (was: Released...)