Wire protocol change

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Wire protocol change
Date: 2016-04-21 15:28:52
Message-ID: 20160422.002852.492604485075798451.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

If we are going to change the wire protocol, it would be nice if parse
complete message includes an identification of the previous parse
message. Same thing can be said to bind complete, command complete and
close complete.

The identification could be an either sequence number assigned to the
parse message or just the statement name (IMO sequence numbers are
better since duplicated statement names could be possible).

Background: in extended protocol, a reply to a message sent to server
could be asynchronously returned. This may raise problems with certain
applications which want to track down the reply messages. Suppose we
have:

Parse('q1')
Bind('s1', 'p1')
Execute('p1')
Parse('q2')
Bind('s2', 'p2')
Execute('p2')
Sync

The reply messages would be:

ParseComplete .. (a)
BindComplete
CommandComplete
ParseComplete .. (b)
BindComplete
CommandComplete
ReadyForQuery

Since (a) and (b) are compeletely identical message, it's not easy to
ditinguish which a and b.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-04-21 15:48:53 Re: Query Procedures
Previous Message Andrea Adami 2016-04-21 15:26:20 Query Procedures