Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4fe2446

Browse files
committed
Add note explaining that NoticeResponse messages can
arrive even while idle.
1 parent 22da903 commit 4fe2446

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

doc/src/sgml/protocol.sgml

+14-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<FirstName>Phil</FirstName>
55
<Surname>Thompson</Surname>
66
</Author>
7-
<Date>1998-07-13</Date>
7+
<Date>1998-08-08</Date>
88
</DocInfo>
99
<Title>Frontend/Backend Protocol</Title>
1010

@@ -389,9 +389,19 @@ The possible response messages from the backend are:
389389

390390
<Para>
391391
A frontend must be prepared to accept ErrorResponse and NoticeResponse
392-
messages whenever it is expecting any other type of message. Also,
393-
if it issues any listen(l) commands then it must be prepared to accept
394-
NotificationResponse messages at any time; see below.
392+
messages whenever it is expecting any other type of message.
393+
394+
<Para>
395+
Actually, it is possible for NoticeResponse to arrive even when the frontend
396+
is not expecting any kind of message, that is, the backend is nominally idle.
397+
(In particular, the backend can be commanded to terminate by its postmaster.
398+
In that case it will send a NoticeResponse before closing the connection.)
399+
It is recommended that the frontend check for such asynchronous notices just
400+
before issuing any new command.
401+
402+
<Para>
403+
Also, if the frontend issues any listen(l) commands then it must be prepared
404+
to accept NotificationResponse messages at any time; see below.
395405

396406

397407
<Sect2>

0 commit comments

Comments
 (0)