Extended queries

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Extended queries
Дата
Msg-id 20051215.101717.32718282.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Extended queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I have difficulties with extended queries and pgpool combo.

the background:

After sending a query to the backend, pgpool waits for a response from
the backend so that pgpool can make sure that the query
completes. This is necessary since pgpool needs to keep the order of
SQL commands (especially which cause some locking), first master then
secondary to avoid a deadlock.

the problem:

a "simple query" returns CommandComplete(or ErrorResponse etc.) after
completing the query. So far no problem.

However a extended query "Execute" does not return CommandComplete
(note: ErrorResponse will be returned if an error occurs). Although
the doc says " Therefore, an Execute phase is always terminated by the
appearance of exactly one of these messages: CommandComplete,
EmptyQueryResponse (if the portal was created from an empty query
string), ErrorResponse, or PortalSuspended", I don't think the
description is quite correct from observing the actual implementation
(or the implementation is wrong).

A workaround I found so far was issuing "Flush" immediately after
"Execute". I'm not sure if this is the correct solution, but I
couldn't find any better way.

Suggestions?
--
Tatsuo Ishii
SRA OSS, Inc. Japan


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Refactoring psql for backward-compatibility
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Refactoring psql for backward-compatibility