[router] add postgres databases data connector#12218
Merged
slin1237 merged 7 commits intosgl-project:mainfrom Nov 11, 2025
Merged
[router] add postgres databases data connector#12218slin1237 merged 7 commits intosgl-project:mainfrom
slin1237 merged 7 commits intosgl-project:mainfrom
Conversation
b75bac5 to
52960d2
Compare
slin1237
requested changes
Oct 30, 2025
Contributor
Author
|
this ci error, i should how to fix? @slin1237 i whether miss code change? |
6301773 to
af384f6
Compare
Contributor
Author
key4ng
reviewed
Nov 8, 2025
| .ok_or("Postgres configuration is required when history_backend=postgres")?; | ||
|
|
||
| info!( | ||
| "Initializing data connector: Postgres (db_url: {}, pool_max: {})", |
Collaborator
There was a problem hiding this comment.
I'm assumnig postgres db_url contains password? if so, we should not log it
Contributor
Author
There was a problem hiding this comment.
change to: Initializing data connector: Postgres (db_url: postgres://postgres:****@127.0.0.1:3306/sql_router?sslmode=prefer, pool_max: 16)
key4ng
reviewed
Nov 8, 2025
key4ng
reviewed
Nov 8, 2025
key4ng
reviewed
Nov 8, 2025
Collaborator
|
thanks for the pr. overall looks good to me, just need some minor changes. |
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
140ec9c to
e50e793
Compare
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
key4ng
reviewed
Nov 11, 2025
| pub fn validate(&self) -> Result<(), String> { | ||
| let s = self.db_url.trim(); | ||
| if s.is_empty() { | ||
| return Err("is it db-url should be not empty".to_string()); |
Collaborator
There was a problem hiding this comment.
typo
Suggested change
| return Err("is it db-url should be not empty".to_string()); | |
| return Err("db-url must not be empty".to_string()); |
key4ng
approved these changes
Nov 11, 2025
slin1237
approved these changes
Nov 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
#10341
Postgres data store provider.
Modifications
Accuracy Tests
requerment: we need a postgres database, and create a name is
sql_routerdb./api/responseapiBenchmarking and Profiling
Checklist