Skip to content

Commit

Permalink
Ensure OLAP config has enough workers for pg_cron (#867)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Hendel <[email protected]>
  • Loading branch information
jasonmp85 and ChuckHend authored Jul 10, 2024
1 parent 0606901 commit 605012f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tembo-stacks/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 tembo-stacks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tembo-stacks"
description = "Tembo Stacks for Postgres"
version = "0.11.0"
version = "0.11.1"
authors = ["tembo.io"]
edition = "2021"
license = "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions tembo-stacks/src/stacks/config_engines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ fn olap_max_parallel_workers(cpu: f32) -> i32 {
}

fn olap_max_worker_processes(cpu: f32) -> i32 {
i32::max(1, cpu.round() as i32)
i32::max(1, cpu.round() as i32) + 1 // add one for cron
}

// olap formula for maintenance_work_mem
Expand Down Expand Up @@ -535,7 +535,7 @@ mod tests {
assert_eq!(configs[5].name, "max_wal_size");
assert_eq!(configs[5].value.to_string(), "2GB");
assert_eq!(configs[6].name, "max_worker_processes");
assert_eq!(configs[6].value.to_string(), "4");
assert_eq!(configs[6].value.to_string(), "5");
assert_eq!(configs[7].name, "shared_buffers");
assert_eq!(configs[7].value.to_string(), "4096MB");
assert_eq!(configs[8].name, "work_mem");
Expand Down Expand Up @@ -568,7 +568,7 @@ mod tests {
assert_eq!(configs[5].name, "max_wal_size");
assert_eq!(configs[5].value.to_string(), "2GB");
assert_eq!(configs[6].name, "max_worker_processes");
assert_eq!(configs[6].value.to_string(), "1");
assert_eq!(configs[6].value.to_string(), "2");
assert_eq!(configs[7].name, "shared_buffers");
assert_eq!(configs[7].value.to_string(), "2048MB");
assert_eq!(configs[8].name, "work_mem");
Expand Down

0 comments on commit 605012f

Please sign in to comment.