Re: Extended query protocol violation?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extended query protocol violation?
Дата
Msg-id 13855.1440976999@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Extended query protocol violation?  (Tatsuo Ishii <ishii@postgresql.org>)
Список pgsql-hackers
Tatsuo Ishii <ishii@postgresql.org> writes:
> Notice that JDBC driver sends Parse, Bind and Execute without Sync
> followed then immediately sends another Parse message.

> I wonder if this violates our extended query protocol.

It does not.

> "At completion of each series of extended-query messages, the frontend
> should issue a Sync message."

That's a "should", not a "must".  The important point here is that if the
BEGIN were to fail for some reason, the backend would skip the second
command altogether, since it would skip to the Sync before resuming
processing messages.  If the JDBC driver isn't expecting that behavior,
that's a bug in the driver --- but it's not a protocol violation.  In
fact, the protocol is intentionally designed to let you stack up commands
like that.  It gives you a tradeoff of potential concurrency vs possible
complexity in error recovery handling.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: icc vs. gcc-style asm blocks ... maybe the twain can meet?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Horizontal scalability/sharding