Skip to content

Commit

Permalink
feat: Upgrade postgresql to 17
Browse files Browse the repository at this point in the history
Related to #1275
  • Loading branch information
helio-frota committed Feb 11, 2025
1 parent b0eb7a6 commit 1be139d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ trustify-module-user = { path = "modules/user" }
# as well as build-dependencies. However, we can't control feature flags for build dependencies the way we do
# it for normal dependencies. So enabling the vendor feature for openssl-sys doesn't work for the build-dependencies.
# This will fail the build on targets where we need vendoring for openssl. Using rustls instead works around this issue.
postgresql_archive = { version = "0.17.3", default-features = false, features = ["theseus", "rustls-tls"] }
postgresql_embedded = { version = "0.17.3", default-features = false, features = ["theseus", "rustls-tls"] }
postgresql_commands = { version = "0.17.3", default-features = false, features = ["tokio"] }
postgresql_archive = { version = "0.17.5", default-features = false, features = ["theseus", "rustls-tls"] }
postgresql_embedded = { version = "0.17.5", default-features = false, features = ["theseus", "rustls-tls"] }
postgresql_commands = { version = "0.17.5", default-features = false, features = ["tokio"] }

[patch.crates-io]
#csaf-walker = { git = "https://github.com/ctron/csaf-walker", rev = "7b6e64dd56e4be79e184b053ef754a42e1496fe0" }
Expand Down
2 changes: 1 addition & 1 deletion common/src/db/embedded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::{info_span, Instrument};

/// Create common default settings for the embedded database
fn default_settings() -> anyhow::Result<Settings> {
let version = VersionReq::parse("=16.3.0").context("valid psql version")?;
let version = VersionReq::parse("=17.2.0").context("valid psql version")?;
Ok(Settings {
version,
username: "postgres".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions etc/deploy/compose/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
postgres:
image: docker.io/library/postgres:16
image: docker.io/library/postgres:17
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: "trustify"
POSTGRES_DB: "trustify"
restart: always
shm_size: '1g'
shm_size: '1g'
2 changes: 1 addition & 1 deletion trustd/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl Run {
("max_connections".to_string(), "500".to_string()),
]);
let settings = postgresql_embedded::Settings {
version: VersionReq::parse("=16.3.0")?,
version: VersionReq::parse("=17.2.0")?,
username: self.database.username.clone(),
password: self.database.password.clone(),
temporary: false,
Expand Down

0 comments on commit 1be139d

Please sign in to comment.