mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-28 03:06:29 +00:00
Compare commits
3 Commits
circleci_n
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e0541668e | ||
|
|
32f4752daf | ||
|
|
3796e26402 |
18
Cargo.lock
generated
18
Cargo.lock
generated
@@ -1341,7 +1341,7 @@ checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"ring",
|
"ring",
|
||||||
"rustls-webpki 0.101.1",
|
"rustls-webpki",
|
||||||
"sct",
|
"sct",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1355,14 +1355,10 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-pki-types"
|
||||||
version = "0.100.2"
|
version = "1.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab"
|
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
|
||||||
dependencies = [
|
|
||||||
"ring",
|
|
||||||
"untrusted",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
@@ -2038,11 +2034,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webpki-roots"
|
name = "webpki-roots"
|
||||||
version = "0.23.1"
|
version = "0.26.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338"
|
checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustls-webpki 0.100.2",
|
"rustls-pki-types",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ atomic_enum = "0.2.0"
|
|||||||
postgres-protocol = "0.6.5"
|
postgres-protocol = "0.6.5"
|
||||||
fallible-iterator = "0.2"
|
fallible-iterator = "0.2"
|
||||||
pin-project = "1"
|
pin-project = "1"
|
||||||
webpki-roots = "0.23"
|
webpki-roots = "0.26"
|
||||||
rustls = { version = "0.21", features = ["dangerous_configuration"] }
|
rustls = { version = "0.21", features = ["dangerous_configuration"] }
|
||||||
trust-dns-resolver = "0.22.0"
|
trust-dns-resolver = "0.22.0"
|
||||||
tokio-test = "0.4.2"
|
tokio-test = "0.4.2"
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ User.find_by_email("test@example.com")
|
|||||||
```sql
|
```sql
|
||||||
-- Grab a bunch of users from shard 1
|
-- Grab a bunch of users from shard 1
|
||||||
SET SHARD TO '1';
|
SET SHARD TO '1';
|
||||||
SELECT * FROM users LIMT 10;
|
SELECT * FROM users LIMIT 10;
|
||||||
|
|
||||||
-- Find by id
|
-- Find by id
|
||||||
SET SHARDING KEY TO '1234';
|
SET SHARDING KEY TO '1234';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: pgcat
|
name: pgcat
|
||||||
description: A Helm chart for PgCat a PostgreSQL pooler and proxy (like PgBouncer) with support for sharding, load balancing, failover and mirroring.
|
description: A Helm chart for PgCat a PostgreSQL pooler and proxy (like PgBouncer) with support for sharding, load balancing, failover and mirroring.
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: Wildcard
|
- name: PostgresML
|
||||||
email: support@w6d.io
|
email: team@postgresml.org
|
||||||
appVersion: "1.2.0"
|
appVersion: "1.2.0"
|
||||||
version: 0.2.4
|
version: 0.2.5
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ primary_reads_enabled = true
|
|||||||
# `random`: picks a shard at random
|
# `random`: picks a shard at random
|
||||||
# `random_healthy`: picks a shard at random favoring shards with the least number of recent errors
|
# `random_healthy`: picks a shard at random favoring shards with the least number of recent errors
|
||||||
# `shard_<number>`: e.g. shard_0, shard_4, etc. picks a specific shard, everytime
|
# `shard_<number>`: e.g. shard_0, shard_4, etc. picks a specific shard, everytime
|
||||||
# `fail`: fails to pick up shard. (require explicit shard setup)
|
|
||||||
# default_shard = "shard_0"
|
# default_shard = "shard_0"
|
||||||
|
|
||||||
# So what if you wanted to implement a different hashing function,
|
# So what if you wanted to implement a different hashing function,
|
||||||
|
|||||||
@@ -773,7 +773,6 @@ pub enum DefaultShard {
|
|||||||
Shard(usize),
|
Shard(usize),
|
||||||
Random,
|
Random,
|
||||||
RandomHealthy,
|
RandomHealthy,
|
||||||
Fail,
|
|
||||||
}
|
}
|
||||||
impl Default for DefaultShard {
|
impl Default for DefaultShard {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
@@ -788,7 +787,6 @@ impl serde::Serialize for DefaultShard {
|
|||||||
}
|
}
|
||||||
DefaultShard::Random => serializer.serialize_str("random"),
|
DefaultShard::Random => serializer.serialize_str("random"),
|
||||||
DefaultShard::RandomHealthy => serializer.serialize_str("random_healthy"),
|
DefaultShard::RandomHealthy => serializer.serialize_str("random_healthy"),
|
||||||
DefaultShard::Fail => serializer.serialize_str("fail"),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -806,7 +804,6 @@ impl<'de> serde::Deserialize<'de> for DefaultShard {
|
|||||||
match s.as_str() {
|
match s.as_str() {
|
||||||
"random" => Ok(DefaultShard::Random),
|
"random" => Ok(DefaultShard::Random),
|
||||||
"random_healthy" => Ok(DefaultShard::RandomHealthy),
|
"random_healthy" => Ok(DefaultShard::RandomHealthy),
|
||||||
"fail" => Ok(DefaultShard::Fail),
|
|
||||||
_ => Err(serde::de::Error::custom(
|
_ => Err(serde::de::Error::custom(
|
||||||
"invalid value for no_shard_specified_behavior",
|
"invalid value for no_shard_specified_behavior",
|
||||||
)),
|
)),
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ pub enum Error {
|
|||||||
QueryRouterError(String),
|
QueryRouterError(String),
|
||||||
InvalidShardId(usize),
|
InvalidShardId(usize),
|
||||||
PreparedStatementError,
|
PreparedStatementError,
|
||||||
NoShardSelected,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Debug)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
|
|||||||
@@ -720,7 +720,6 @@ impl ConnectionPool {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
DefaultShard::Fail => return Err(Error::NoShardSelected),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user