greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

feat: add schema check on postgres startup

Open sunng87 opened this issue 3 years ago • 1 comments

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This patch adds check for database parameter to see if it's valid and reject connection accordingly.

It adds CatalogHandler to server handler family, and will be open to other apis like http.

Checklist

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

Refer to a related PR or issue link (optional)

sunng87 avatar Dec 16 '22 08:12 sunng87

Codecov Report

Merging #758 (5e9484e) into develop (28bd740) will decrease coverage by 0.01%. The diff coverage is 84.12%.

@@             Coverage Diff             @@
##           develop     #758      +/-   ##
===========================================
- Coverage    85.39%   85.38%   -0.02%     
===========================================
  Files          413      414       +1     
  Lines        54142    54345     +203     
===========================================
+ Hits         46237    46400     +163     
- Misses        7905     7945      +40     
Flag Coverage Δ
rust 85.38% <84.12%> (-0.02%) :arrow_down:

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

Impacted Files Coverage Δ
src/frontend/src/server.rs 0.00% <0.00%> (ø)
src/servers/src/error.rs 52.38% <ø> (+20.67%) :arrow_up:
src/servers/src/postgres/auth_handler.rs 88.97% <84.90%> (+5.16%) :arrow_up:
src/frontend/src/instance.rs 73.32% <85.71%> (-0.73%) :arrow_down:
src/servers/src/postgres/server.rs 97.10% <100.00%> (+0.08%) :arrow_up:
src/datanode/src/sql/insert.rs 80.43% <0.00%> (-9.79%) :arrow_down:
src/frontend/src/table/scan.rs 75.00% <0.00%> (-5.00%) :arrow_down:
src/frontend/src/instance/distributed.rs 79.92% <0.00%> (-2.22%) :arrow_down:
src/common/substrait/src/types.rs 50.52% <0.00%> (-2.11%) :arrow_down:
src/query/src/datafusion/error.rs 92.00% <0.00%> (-1.25%) :arrow_down:
... and 25 more

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

codecov[bot] avatar Dec 16 '22 09:12 codecov[bot]