Skip to content

refactor: make postgres handler stateful#914

Merged
sunng87 merged 4 commits intoGreptimeTeam:developfrom
sunng87:feature/pgwire-08
Jan 31, 2023
Merged

refactor: make postgres handler stateful#914
sunng87 merged 4 commits intoGreptimeTeam:developfrom
sunng87:feature/pgwire-08

Conversation

@sunng87
Copy link
Copy Markdown
Member

@sunng87 sunng87 commented Jan 29, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This patch updates pgwire to 0.8 and make our PostgresServerHandler stateful (one handler per connection). This is prerequisite for upcoming prepared statement support.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@sunng87 sunng87 enabled auto-merge (squash) January 29, 2023 10:37
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 29, 2023

Codecov Report

Merging #914 (be57c13) into develop (a7dc86f) will decrease coverage by 0.15%.
The diff coverage is 73.62%.

@@             Coverage Diff             @@
##           develop     #914      +/-   ##
===========================================
- Coverage    86.19%   86.04%   -0.15%     
===========================================
  Files          430      431       +1     
  Lines        58227    58246      +19     
===========================================
- Hits         50187    50118      -69     
- Misses        8040     8128      +88     
Flag Coverage Δ
rust 86.04% <73.62%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/servers/src/postgres/handler.rs 83.21% <14.81%> (-7.46%) ⬇️
src/servers/src/postgres/auth_handler.rs 88.48% <95.00%> (-1.46%) ⬇️
src/servers/src/postgres.rs 100.00% <100.00%> (ø)
src/servers/src/postgres/server.rs 96.92% <100.00%> (-0.10%) ⬇️
src/object-store/src/test_util.rs 0.00% <0.00%> (-100.00%) ⬇️
src/datanode/src/instance.rs 47.11% <0.00%> (-10.67%) ⬇️
tests-integration/src/test_util.rs 79.18% <0.00%> (-9.39%) ⬇️
src/servers/src/error.rs 38.59% <0.00%> (-5.27%) ⬇️
src/servers/src/opentsdb.rs 96.82% <0.00%> (-1.59%) ⬇️
src/meta-srv/src/service/heartbeat.rs 86.17% <0.00%> (-1.07%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment thread src/servers/src/postgres/handler.rs Outdated
Comment thread src/servers/src/postgres/server.rs
Copy link
Copy Markdown
Contributor

@shuiyisong shuiyisong left a comment

Choose a reason for hiding this comment

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

LGTM

@sunng87 sunng87 merged commit 39df25a into GreptimeTeam:develop Jan 31, 2023
@sunng87 sunng87 mentioned this pull request Feb 8, 2023
2 tasks
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: update pgwire to 0.8 and unify postgres handler

* fix: correct password message matching
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.

3 participants