Re: Wire protocol change

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Wire protocol change
Date: 2016-04-21 18:52:01
Message-ID: 16191.1461264721@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> 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.

Uh, what? There's no asynchrony in the protocol --- messages are
processed and answered strictly in order. I grant that certain types
of application structures might find it convenient if we numbered the
responses, but it seems like mostly a waste of network bandwidth.
The application should be able to count the results for itself.

In any case, if the server simply numbers the responses, how does that
help? In the example you show, the ParseComplete messages might come
back with numbers 42 and 43 --- exactly how does that help the app
associate them with the commands it sent?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2016-04-21 19:10:58 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Previous Message Tom Lane 2016-04-21 18:45:16 Re: [COMMITTERS] pgsql: Inline initial comparisons in TestForOldSnapshot()