Extended query protocol violation?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Extended query protocol violation?
Дата
Msg-id 20150831.080233.1337812268065215575.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Extended query protocol violation?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
While playing with Java application using JDBC driver, I noticed
an interesting fact:

When autocommit is off, JDBC driver issues following messages:

20:10:54.731 (2)  FE=> Parse(stmt=S_1,query="BEGIN",oids={})
20:10:54.731 (2)  FE=> Bind(stmt=S_1,portal=null)
20:10:54.731 (2)  FE=> Execute(portal=null,limit=0)
20:10:54.732 (2)  FE=> Parse(stmt=null,query="SELECT ...
20:10:54.733 (2)  FE=> Bind(stmt=null,portal=null)
20:10:54.733 (2)  FE=> Describe(portal=null)
20:10:54.733 (2)  FE=> Execute(portal=null,limit=0)
20:10:54.733 (2)  FE=> Sync
20:10:54.734 (2)  <=BE ParseComplete [S_1]
20:10:54.734 (2)  <=BE BindComplete [null]
20:10:54.734 (2)  <=BE CommandStatus(BEGIN)
20:10:54.735 (2)  <=BE ParseComplete [null]
20:10:54.735 (2)  <=BE BindComplete [null]
20:10:54.735 (2)  <=BE RowDescription(15)

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.  From the manual:

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

"each series of extended-query messages" is a little vague here but it
seems it referes to a sequence of message starting with parse and
ending with execute message to me. If so, I think above example of
message sequence violates the protocol.

The application produces the packet sequence is essentially like this:

connection.setAutoCommit(false);
stmt = connection.createStatement();
rs = stmt.executeQuery(sql);        
Comments?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Potential GIN vacuum bug
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Horizontal scalability/sharding