Skip to content

Commit

Permalink
Double max_locks_per_transaction
Browse files Browse the repository at this point in the history
After our last maintenance event, we have realized that current defaults
do not suffice, specially for big dbs.
Given that, We're doubling what we assign in our tuner.
  • Loading branch information
adolsalamanca committed Mar 27, 2024
1 parent 218e065 commit 154501b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pkg/pgtune/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ func getEffectiveIOConcurrency(pgMajorVersion string) string {

// maxLocksValues gives the number of locks for a power-2 memory starting
// with sub-8GB. i.e.:
// < 8GB = 64
// >=8GB, < 16GB = 128
// >=16GB, < 32GB = 256
// >=32GB = 512
var maxLocksValues = []string{"64", "128", "256", "512"}
// < 8GB = 128
// >=8GB, < 16GB = 256
// >=16GB, < 32GB = 512
// >=32GB = 1024
var maxLocksValues = []string{"128", "256", "512", "1024"}

// MiscLabel is the label used to refer to the miscellaneous settings group
const MiscLabel = "miscellaneous"
Expand Down
4 changes: 2 additions & 2 deletions pkg/tstune/tuner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1426,9 +1426,9 @@ var (
fmt.Sprintf("max_connections = %d", testMaxConns),
"autovacuum_max_workers = 10",
"autovacuum_naptime = 10",
"max_locks_per_transaction = 64",
"effective_io_concurrency = 200",
"max_locks_per_transaction = 128",
"effective_io_concurrency = 200",
"max_locks_per_transaction = 256",
}
)

Expand Down

0 comments on commit 154501b

Please sign in to comment.