pqParseInput3 overruns

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: pqParseInput3 overruns
Date: 2019-07-26 04:18:01
Message-ID: 20190726.131801.21232141.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

While looking [1], I noticed that NOTICE messages of the next
command is processed before PQgetResult returns. Clients can
receive such spurious NOTICE messages.

Looking pqParseInput3, its main loop seems considered to exit
after complete messages is processed. (As I read.)

> * Loop to parse successive complete messages available in the buffer.

But actually, 'C' message doesn't work that way. I think we
should do as the comment suggests. Clients still can process
async messages or (somehow issued) NOTICE messages in later
calls.

[1]: https://www.postgresql.org/message-id/alpine.DEB.2.21.1904132231510.8961@lancre

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Don-t-parse-further-messages-after-COMPLETE-message.patch text/x-patch 1.1 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2019-07-26 05:33:40 Warning messages appearing twice
Previous Message Kyotaro Horiguchi 2019-07-26 04:17:04 Re: psql - add SHOW_ALL_RESULTS option