Skip to content

Commit

Permalink
new postgresql 16
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Sep 22, 2023
1 parent 4fd4ac7 commit b11a642
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
42 changes: 9 additions & 33 deletions src/features/configuration/configurationSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ const SIZE_UNIT_MAP = {
TB: 1099511627776
}

const DEFAULT_DB_SETTINGS = {
default: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
}
}

// redux

const initialState = {
Expand Down Expand Up @@ -89,39 +97,7 @@ const selectTotalMemoryInKb = createSelector(

const selectDbDefaultValues = createSelector(
[selectDBVersion],
(dbVersion) =>
({
10: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
},
11: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
},
12: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
},
13: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
},
14: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
},
15: {
['max_worker_processes']: 8,
['max_parallel_workers_per_gather']: 2,
['max_parallel_workers']: 8
}
})[dbVersion]
(dbVersion) => DEFAULT_DB_SETTINGS[dbVersion] || DEFAULT_DB_SETTINGS.default
)

export const selectIsConfigured = createSelector(
Expand Down
4 changes: 2 additions & 2 deletions src/features/configuration/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// postgresql versions
export const DEFAULT_DB_VERSION = 15
export const DB_VERSIONS = [DEFAULT_DB_VERSION, 14, 13, 12, 11, 10]
export const DEFAULT_DB_VERSION = 16
export const DB_VERSIONS = [DEFAULT_DB_VERSION, 15, 14, 13, 12, 11, 10]
// os types
export const OS_LINUX = 'linux'
export const OS_WINDOWS = 'windows'
Expand Down

0 comments on commit b11a642

Please sign in to comment.