Skip to content

conn#readReadyForQuery(): on error (E) message throw that specific error#1136

Closed
Al2Klimov wants to merge 1 commit intolib:masterfrom
Al2Klimov:unexpected-message-e-expected-readyforquery-478
Closed

conn#readReadyForQuery(): on error (E) message throw that specific error#1136
Al2Klimov wants to merge 1 commit intolib:masterfrom
Al2Klimov:unexpected-message-e-expected-readyforquery-478

Conversation

@Al2Klimov
Copy link
Contributor

not a generic one, so that the application can decide how to handle it. Sure it is an "unexpected message", but not a protocol error:

A frontend must be prepared to accept ErrorResponse and NoticeResponse
messages whenever it is expecting any other type of message.

-- https://www.postgresql.org/docs/current/protocol-flow.html

fixes Icinga/icingadb#478

not a generic one, so that the application can decide how to handle it.
Sure it is an "unexpected message", but not a protocol error:

> A frontend must be prepared to accept ErrorResponse and NoticeResponse
> messages whenever it is expecting any other type of message.

-- https://www.postgresql.org/docs/current/protocol-flow.html
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution! is there a way you can test this change?

@Al2Klimov

This comment was marked as off-topic.

@log1-c

This comment was marked as off-topic.

@Al2Klimov

This comment was marked as off-topic.

@log1-c

This comment was marked as off-topic.

@Al2Klimov

This comment was marked as off-topic.

@log1-c

This comment was marked as off-topic.

@Al2Klimov

This comment was marked as off-topic.

@log1-c

This comment was marked as off-topic.

@Al2Klimov

This comment was marked as off-topic.

@Al2Klimov
Copy link
Contributor Author

thanks for your contribution! is there a way you can test this change?

Look, @rafiss, @log1-c has successfully tested this PR: Icinga/icingadb#620 (comment) 🎉

@arp242 arp242 added bug needs-test Needs a test before it can be merged labels Dec 31, 2025
arp242 pushed a commit that referenced this pull request Jan 3, 2026
From https://www.postgresql.org/docs/current/protocol-flow.html :

> A frontend must be prepared to accept ErrorResponse and NoticeResponse
> messages whenever it is expecting any other type of message.

From #1136
arp242 pushed a commit that referenced this pull request Jan 3, 2026
From https://www.postgresql.org/docs/current/protocol-flow.html :

> A frontend must be prepared to accept ErrorResponse and NoticeResponse
> messages whenever it is expecting any other type of message.

From #1136
arp242 added a commit that referenced this pull request Jan 3, 2026
From https://www.postgresql.org/docs/current/protocol-flow.html :

> A frontend must be prepared to accept ErrorResponse and NoticeResponse
> messages whenever it is expecting any other type of message.

From #1136

Co-authored-by: Alexander A. Klimov <alexander.klimov@icinga.com>
@arp242
Copy link
Collaborator

arp242 commented Jan 3, 2026

Thanks; merged it via #1220 (I had to resolve a conflict, and editing is disabled on this PR).

@arp242 arp242 closed this Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug needs-test Needs a test before it can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants