File tree Expand file tree Collapse file tree
single_kernel_postgresql/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44[project ]
55name = " postgresql-charms-single-kernel"
66description = " Shared and reusable code for PostgreSQL-related charms"
7- version = " 16.2.1 "
7+ version = " 16.2.2 "
88readme = " README.md"
99license = {file = " LICENSE" }
1010authors = [
@@ -35,11 +35,11 @@ module-root = ""
3535
3636[dependency-groups ]
3737format = [
38- " ruff==0.15.13 "
38+ " ruff==0.15.14 "
3939]
4040lint = [
4141 " codespell==2.4.2" ,
42- " ty==0.0.37 "
42+ " ty==0.0.39 "
4343]
4444unit = [
4545 " coverage[toml]==7.14.0" ,
Original file line number Diff line number Diff line change @@ -1381,14 +1381,14 @@ def build_postgresql_parameters(
13811381 parameters [parameter ] = value
13821382 shared_buffers_max_value_in_mb = int (available_memory * 0.4 / 10 ** 6 )
13831383 shared_buffers_max_value = int (shared_buffers_max_value_in_mb * 10 ** 3 / 8 )
1384- if parameters .get ("shared_buffers" , 0 ) > shared_buffers_max_value :
1384+ if int ( parameters .get ("shared_buffers" , 0 ) ) > shared_buffers_max_value :
13851385 raise Exception (
13861386 f"Shared buffers config option should be at most 40% of the available memory, which is { shared_buffers_max_value_in_mb } MB"
13871387 )
13881388 if profile == "production" :
13891389 if "shared_buffers" in parameters :
13901390 # Convert to bytes to use in the calculation.
1391- shared_buffers = parameters ["shared_buffers" ] * 8 * 10 ** 3
1391+ shared_buffers = int ( parameters ["shared_buffers" ]) * 8 * 10 ** 3
13921392 else :
13931393 # Use 25% of the available memory for shared_buffers.
13941394 # and the remaining as cache memory.
You can’t perform that action at this time.
0 commit comments