Skip to content

Commit

Permalink
feat: upgrade pgwire to 0.18 for corrected statement caching
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Dec 26, 2023
1 parent 1c9bf2e commit 00bd6cf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ openmetrics-parser = "0.4"
opensrv-mysql = { git = "https://github.com/MichaelScofield/opensrv.git", rev = "1676c1d" }
opentelemetry-proto.workspace = true
parking_lot = "0.12"
pgwire = "0.17"
pgwire = "0.18"
pin-project = "1.0"
postgres-types = { version = "0.2", features = ["with-chrono-0_4"] }
pprof = { version = "0.13", features = [
Expand Down
4 changes: 0 additions & 4 deletions src/servers/src/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use std::sync::Arc;
use ::auth::UserProviderRef;
use derive_builder::Builder;
use pgwire::api::auth::ServerParameterProvider;
use pgwire::api::store::MemPortalStore;
use pgwire::api::ClientInfo;
pub use server::PostgresServer;
use session::context::Channel;
Expand All @@ -40,7 +39,6 @@ use session::Session;
use self::auth_handler::PgLoginVerifier;
use self::handler::DefaultQueryParser;
use crate::query_handler::sql::ServerSqlQueryHandlerRef;
use crate::SqlPlan;

pub(crate) struct GreptimeDBStartupParameters {
version: &'static str,
Expand Down Expand Up @@ -76,7 +74,6 @@ pub struct PostgresServerHandler {
param_provider: Arc<GreptimeDBStartupParameters>,

session: Arc<Session>,
portal_store: Arc<MemPortalStore<SqlPlan>>,
query_parser: Arc<DefaultQueryParser>,
}

Expand All @@ -99,7 +96,6 @@ impl MakePostgresServerHandler {
param_provider: self.param_provider.clone(),

session: session.clone(),
portal_store: Arc::new(MemPortalStore::new()),
query_parser: Arc::new(DefaultQueryParser::new(self.query_handler.clone(), session)),
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/servers/src/postgres/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use pgwire::api::portal::{Format, Portal};
use pgwire::api::query::{ExtendedQueryHandler, SimpleQueryHandler, StatementOrPortal};
use pgwire::api::results::{DataRowEncoder, DescribeResponse, QueryResponse, Response, Tag};
use pgwire::api::stmt::QueryParser;
use pgwire::api::store::MemPortalStore;
use pgwire::api::{ClientInfo, Type};
use pgwire::error::{ErrorInfo, PgWireError, PgWireResult};
use query::query_engine::DescribeResult;
Expand Down Expand Up @@ -192,11 +191,6 @@ impl QueryParser for DefaultQueryParser {
impl ExtendedQueryHandler for PostgresServerHandler {
type Statement = SqlPlan;
type QueryParser = DefaultQueryParser;
type PortalStore = MemPortalStore<Self::Statement>;

fn portal_store(&self) -> Arc<Self::PortalStore> {
self.portal_store.clone()
}

fn query_parser(&self) -> Arc<Self::QueryParser> {
self.query_parser.clone()
Expand Down

0 comments on commit 00bd6cf

Please sign in to comment.