Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset instead of discard all #549

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

zainkabani
Copy link
Contributor

@zainkabani zainkabani commented Aug 16, 2023

DISCARD ALL can destroy any prepared statements on a server which is not something we want when using prepared statement mode. Instead we can be more precise in our cleanup steps and RESET all settings using the RESET ALL command, and DEALLOCATE ALL only when a prepare is sent

@@ -821,6 +821,14 @@ where
message_result = read_message(&mut self.read) => message_result?
};

if message[0] as char == 'X' {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A previous PR had moved the admin handling to before the message code match, an admin client disconnect produces an error log so this moves the 'X' message code check to before the admin client handling

@zainkabani zainkabani marked this pull request as ready for review August 16, 2023 17:01
Copy link
Contributor

@levkk levkk left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@levkk levkk merged commit bb27586 into postgresml:main Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants