Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit 708e7b4

Browse files
committed
F008: max workers mem fixed
1 parent 4b46d6c commit 708e7b4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pghrep/templates/A003.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Observations ##
44
{{ if .hosts.master }}
55
### Master (`{{.hosts.master}}`) ###
6-
▼ Setting | Value | Unit | Pretty value
6+
Setting | Value | Unit | Pretty value
77
--------|-------|------|--------------
88
{{ range $i, $key := (index (index (index .results .hosts.master) "data") "_keys") }}
99
{{- $value := (index (index (index $.results $.hosts.master) "data") $key) -}}

pghrep/templates/F008.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Ram amount you can see in report A001
2222

2323
{{- $autovacuum_work_mem := (RawIntUnitValue (index (index (index .results .hosts.master) "data") "autovacuum_work_mem").setting (index (index (index .results .hosts.master) "data") "autovacuum_work_mem").unit) -}}
2424
{{- $maintenance_work_mem := (RawIntUnitValue (index (index (index .results .hosts.master) "data") "maintenance_work_mem").setting (index (index (index .results .hosts.master) "data") "maintenance_work_mem").unit) -}}
25-
{{- $max_connections := (RawIntUnitValue (index (index (index .results .hosts.master) "data") "max_connections").setting (index (index (index .results .hosts.master) "data") "max_connections").unit) }}
25+
{{- $autovacuum_max_workers := (RawIntUnitValue (index (index (index .results .hosts.master) "data") "autovacuum_max_workers").setting (index (index (index .results .hosts.master) "data") "autovacuum_max_workers").unit) }}
2626

2727
{{ if eq $autovacuum_work_mem -1 -}}
28-
Max workers memory: {{ ByteFormat ( Mul $maintenance_work_mem $max_connections ) 0 }}
28+
Max workers memory: {{ ByteFormat ( Mul $maintenance_work_mem $autovacuum_max_workers ) 0 }}
2929
{{- else -}}
30-
Max workers memory: {{ ByteFormat ( Mul $autovacuum_work_mem $max_connections ) 0 }}
30+
Max workers memory: {{ ByteFormat ( Mul $autovacuum_work_mem $autovacuum_max_workers ) 0 }}
3131
{{- end }}
3232

3333

pghrep/templates/G002.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Observations ##
44
{{ if .hosts.master }}
55
### Master (`{{.hosts.master}}`) ###
6-
Num | User | DB | Current state | Count | State changed >1m ago | State changed >1h ago
6+
\# | User | DB | Current state | Count | State changed >1m ago | State changed >1h ago
77
----|------|----|---------------|-------|-----------------------|-----------------------
88
{{ range $i, $key := (index (index (index .results .hosts.master) "data") "_keys") }}
99
{{- $value := (index (index (index $.results $.hosts.master) "data") $key) -}}
@@ -17,7 +17,7 @@ Num | User | DB | Current state | Count | State changed >1m ago | State changed
1717
{{ range $skey, $host := .hosts.replicas }}
1818
#### Replica (`{{ $host }}`) ####
1919
{{ if (index $.results $host) }}
20-
Num | User | DB | Current state | Count | State changed >1m ago | State changed >1h ago
20+
\# | User | DB | Current state | Count | State changed >1m ago | State changed >1h ago
2121
----|------|----|---------------|-------|-----------------------|-----------------------
2222
{{ range $i, $key := (index (index (index $.results $host) "data") "_keys") }}
2323
{{- $value := (index (index (index $.results $host) "data") $key) -}}

0 commit comments

Comments
 (0)