Re: extended query protcol violation?

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: sitnikov(dot)vladimir(at)gmail(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: extended query protcol violation?
Date: 2018-12-08 10:16:36
Message-ID: 20181208.191636.1107887621551851973.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Tatsuo>responses of a simple query do not include CloseComplete
>
> Tatsuo, where do you get the logs from?

As I said, pgproto.

https://github.com/tatsuo-ishii/pgproto

> I guess you are just confused by the PRINTED order of the messages in the
> log.
> Note: wire order do not have to be exactly the same as the order in the log
> since messages are buffered, then might be read in batches.

pgproto directly reads from socket using read system call. There's no
buffer here.

> In other words, an application might just batch (send all three) close(s2),
> close(s1), query(begin) messages, then read the responses.
> How does it break protocol?

Again as I said before, the doc says in extended query protocol a
sequence of extended messages (parse, bind. describe, execute, closes)
should be followed by a sync message. ie.

close
close
sync
query(begin)

Maybe

close
close
query(begin)

is not a violation of protocol, but still I would say this is buggy
because of the reason Tom said, and I agree with him.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2018-12-08 10:52:31 Re: Undo logs
Previous Message Andrey Borodin 2018-12-08 09:48:06 Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock