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

Commit bb88838

Browse files
committed
Merge branch 'dmius-386' into 'master'
F005 conclusions and recommendations, Fix remarks See merge request postgres-ai/postgres-checkup!320
2 parents 266d14d + 0cbe081 commit bb88838

File tree

21 files changed

+670
-161
lines changed

21 files changed

+670
-161
lines changed

pghrep/src/checkup/a002/a002.go

Lines changed: 65 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ type SupportedVersion struct {
2222
MinorVersions []int
2323
}
2424

25+
var MAJOR_VERSIONS []int
26+
2527
var SUPPORTED_VERSIONS map[string]SupportedVersion = map[string]SupportedVersion{
2628
"11": SupportedVersion{
2729
FirstRelease: "2018-10-18",
@@ -50,7 +52,24 @@ var SUPPORTED_VERSIONS map[string]SupportedVersion = map[string]SupportedVersion
5052
},
5153
}
5254

55+
func getMajorMinorVersion(serverVersion string) (string, string) {
56+
var minorVersion string
57+
var majorVersion string
58+
minorVersion = serverVersion[len(serverVersion)-2 : len(serverVersion)]
59+
i, _ := strconv.Atoi(minorVersion)
60+
minorVersion = strconv.Itoa(i)
61+
if serverVersion[0:1] == "9" {
62+
majorVersion = serverVersion[0:3]
63+
majorVersion = strings.Replace(majorVersion, "0", ".", 1)
64+
} else {
65+
majorVersion = serverVersion[0:2]
66+
}
67+
return majorVersion, minorVersion
68+
}
69+
5370
func A002PrepareVersionInfo() {
71+
var majorVersions map[int]bool
72+
majorVersions = make(map[int]bool)
5473
url := VERSION_SOURCE_URL
5574
log.Dbg("HTML code of %s ...\n", url)
5675
resp, err := http.Get(url)
@@ -81,6 +100,12 @@ func A002PrepareVersionInfo() {
81100
majorVersion = majorVersion + "."
82101
}
83102
majorVersion = majorVersion + ver[1]
103+
intMajorVersion := strings.Replace(majorVersion, ".", "0", 1)
104+
if len(intMajorVersion) < 3 {
105+
intMajorVersion = intMajorVersion + "00"
106+
}
107+
iMVer, _ := strconv.Atoi(intMajorVersion)
108+
majorVersions[iMVer] = true
84109
minorVersion := ver[2]
85110
ver, ok := SUPPORTED_VERSIONS[majorVersion]
86111
if ok {
@@ -92,6 +117,10 @@ func A002PrepareVersionInfo() {
92117
}
93118
tokenType = domDocTest.Next()
94119
}
120+
for ver, _ := range majorVersions {
121+
MAJOR_VERSIONS = append(MAJOR_VERSIONS, ver)
122+
}
123+
sort.Ints(MAJOR_VERSIONS)
95124
}
96125

97126
func A002CheckAllVersionsIsSame(report A002Report,
@@ -101,19 +130,20 @@ func A002CheckAllVersionsIsSame(report A002Report,
101130
var vers []string
102131
diff := false
103132
for host, hostData := range report.Results {
133+
majorVersion, minorVersion := getMajorMinorVersion(hostData.Data.ServerVersionNum)
104134
if version == "" {
105-
version = hostData.Data.ServerMajorVer + "." + hostData.Data.ServerMinorVer
135+
version = majorVersion + "." + minorVersion
106136
}
107-
if version != (hostData.Data.ServerMajorVer + "." + hostData.Data.ServerMinorVer) {
137+
if version != (majorVersion + "." + minorVersion) {
108138
diff = true
109139
}
110140
hosts = append(hosts, host)
111-
vers = append(vers, hostData.Data.ServerMajorVer+"."+hostData.Data.ServerMinorVer)
141+
vers = append(vers, majorVersion+"."+minorVersion)
112142
}
113143
if diff && len(hosts) > 1 {
114144
result.AppendConclusion(english.PluralWord(len(hosts),
115145
MSG_NOT_ALL_VERSIONS_SAME_CONCLUSION_1, MSG_NOT_ALL_VERSIONS_SAME_CONCLUSION_N),
116-
strings.Join(hosts, ", "), strings.Join(vers, ", "))
146+
strings.Join(hosts, "`, `"), strings.Join(getUniques(vers), "`, `"))
117147
result.AppendRecommendation(MSG_NOT_ALL_VERSIONS_SAME_RECOMMENDATION)
118148
result.P2 = true
119149
} else {
@@ -125,11 +155,14 @@ func A002CheckAllVersionsIsSame(report A002Report,
125155
func A002CheckMajorVersions(report A002Report, result checkup.ReportOutcome) checkup.ReportOutcome {
126156
var processed map[string]bool = map[string]bool{}
127157
for host, hostData := range report.Results {
128-
if _, vok := processed[hostData.Data.ServerMajorVer]; vok {
158+
majorVersion, _ := getMajorMinorVersion(hostData.Data.ServerVersionNum)
159+
mjVersion := hostData.Data.ServerVersionNum[0 : len(hostData.Data.ServerVersionNum)-2]
160+
iMajorVersion, _ := strconv.Atoi(mjVersion)
161+
if _, vok := processed[majorVersion]; vok {
129162
// version already checked
130163
continue
131164
}
132-
ver, ok := SUPPORTED_VERSIONS[hostData.Data.ServerMajorVer]
165+
ver, ok := SUPPORTED_VERSIONS[majorVersion]
133166
if !ok {
134167
result.AppendConclusion(MSG_WRONG_VERSION_CONCLUSION, hostData.Data.Version, host)
135168
result.AppendRecommendation(MSG_WRONG_VERSION_RECOMMENDATION, host)
@@ -142,20 +175,24 @@ func A002CheckMajorVersions(report A002Report, result checkup.ReportOutcome) che
142175
today := time.Now()
143176
if today.After(to) {
144177
// already not supported versions
145-
result.AppendConclusion(MSG_NOT_SUPPORTED_VERSION_CONCLUSION, hostData.Data.ServerMajorVer, ver.FinalRelease)
146-
result.AppendRecommendation(MSG_NOT_SUPPORTED_VERSION_RECOMMENDATION, hostData.Data.ServerMajorVer)
178+
result.AppendConclusion(MSG_NOT_SUPPORTED_VERSION_CONCLUSION, majorVersion, ver.FinalRelease)
179+
result.AppendRecommendation(MSG_NOT_SUPPORTED_VERSION_RECOMMENDATION, majorVersion)
147180
result.P1 = true
148181
}
149182
if today.After(yearBeforeFinal) && today.Before(to) {
150183
// supported last year
151-
result.AppendConclusion(MSG_LAST_YEAR_SUPPORTED_VERSION_CONCLUSION, hostData.Data.ServerMajorVer, ver.FinalRelease)
184+
result.AppendConclusion(MSG_LAST_YEAR_SUPPORTED_VERSION_CONCLUSION, majorVersion, ver.FinalRelease)
152185
result.P2 = true
153186
}
154187
if today.After(from) && today.After(to) {
155188
// ok
156-
result.AppendConclusion(MSG_SUPPORTED_VERSION_CONCLUSION, hostData.Data.ServerMajorVer, ver.FinalRelease)
189+
result.AppendConclusion(MSG_SUPPORTED_VERSION_CONCLUSION, majorVersion, ver.FinalRelease)
190+
}
191+
if MAJOR_VERSIONS[len(MAJOR_VERSIONS)-1] > iMajorVersion {
192+
result.AppendRecommendation(MSG_NOT_LAST_MAJOR_VERSION_CONCLUSION, float32(MAJOR_VERSIONS[len(MAJOR_VERSIONS)-1])/100.0)
193+
result.P3 = true
157194
}
158-
processed[hostData.Data.ServerMajorVer] = true
195+
processed[majorVersion] = true
159196
}
160197
return result
161198
}
@@ -166,35 +203,36 @@ func A002CheckMinorVersions(report A002Report, result checkup.ReportOutcome) che
166203
var updateVersions []string
167204
var processed map[string]bool = map[string]bool{}
168205
for host, hostData := range report.Results {
169-
if _, vok := processed[hostData.Data.ServerMinorVer]; vok {
206+
majorVersion, minorVersion := getMajorMinorVersion(hostData.Data.ServerVersionNum)
207+
if _, vok := processed[minorVersion]; vok {
170208
// version already checked
171209
continue
172210
}
173-
ver, ok := SUPPORTED_VERSIONS[hostData.Data.ServerMajorVer]
211+
ver, ok := SUPPORTED_VERSIONS[majorVersion]
174212
if !ok {
175-
result.AppendConclusion(MSG_NOT_SUPPORTED_VERSION_CONCLUSION, hostData.Data.ServerMajorVer, ver.FinalRelease)
176-
result.AppendRecommendation(MSG_NOT_SUPPORTED_VERSION_RECOMMENDATION, hostData.Data.ServerMajorVer)
213+
result.AppendConclusion(MSG_NOT_SUPPORTED_VERSION_CONCLUSION, majorVersion, ver.FinalRelease)
214+
result.AppendRecommendation(MSG_NOT_SUPPORTED_VERSION_RECOMMENDATION, majorVersion)
177215
result.P1 = true
178216
continue
179217
}
180218
sort.Ints(ver.MinorVersions)
181219
lastVersion := ver.MinorVersions[len(ver.MinorVersions)-1]
182-
minorVersion, _ := strconv.Atoi(hostData.Data.ServerMinorVer)
183-
if minorVersion >= lastVersion {
220+
intMinorVersion, _ := strconv.Atoi(minorVersion)
221+
if intMinorVersion >= lastVersion {
184222
result.AppendConclusion(MSG_LAST_MINOR_VERSION_CONCLUSION,
185-
hostData.Data.ServerMajorVer+"."+hostData.Data.ServerMinorVer, hostData.Data.ServerMajorVer)
186-
processed[hostData.Data.ServerMinorVer] = true
223+
majorVersion+"."+minorVersion, majorVersion)
224+
processed[minorVersion] = true
187225
} else {
188226
updateHosts = append(updateHosts, host)
189-
curVersions = append(curVersions, hostData.Data.ServerMajorVer+"."+hostData.Data.ServerMinorVer)
190-
updateVersions = append(updateVersions, hostData.Data.ServerMajorVer+"."+strconv.Itoa(lastVersion))
227+
curVersions = append(curVersions, majorVersion+"."+minorVersion)
228+
updateVersions = append(updateVersions, majorVersion+"."+strconv.Itoa(lastVersion))
191229
}
192230
}
193231
curVersions = getUniques(curVersions)
194232
if len(curVersions) > 0 {
195233
result.AppendConclusion(english.PluralWord(len(curVersions),
196234
MSG_NOT_LAST_MINOR_VERSION_CONCLUSION_1, MSG_NOT_LAST_MINOR_VERSION_CONCLUSION_N),
197-
strings.Join(curVersions, ", "), updateVersions[0])
235+
strings.Join(curVersions, "`, `"), updateVersions[0])
198236
result.AppendRecommendation(MSG_NOT_LAST_MINOR_VERSION_RECOMMENDATION, updateVersions[0])
199237
result.P2 = true
200238
}
@@ -238,7 +276,11 @@ func A002PreprocessReportData(data map[string]interface{}) {
238276
if len(result.Recommendations) == 0 {
239277
result.AppendRecommendation(MSG_NO_RECOMMENDATION)
240278
} else {
241-
result.AppendRecommendation(MSG_GENERAL_RECOMMENDATION)
279+
if !result.P3 {
280+
result.AppendRecommendation(MSG_GENERAL_RECOMMENDATION_1)
281+
} else {
282+
result.AppendRecommendation(MSG_GENERAL_RECOMMENDATION_1 + MSG_GENERAL_RECOMMENDATION_2)
283+
}
242284
}
243285
// update data and file
244286
checkup.SaveConclusionsRecommendations(data, result)

pghrep/src/checkup/a002/a002_test.go

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ import (
77
checkup ".."
88
)
99

10-
func printConclusions(result checkup.ReportOutcome) {
11-
for _, conclusion := range result.Conclusions {
12-
fmt.Println("C: ", conclusion)
10+
func TestGetMajorMinorVersion(t *testing.T) {
11+
major, minor := getMajorMinorVersion("110003")
12+
if major != "11" || minor != "3" {
13+
t.Fatal("TestGetMajorMinorVersion failed")
1314
}
14-
}
15-
16-
func printReccomendations(result checkup.ReportOutcome) {
17-
for _, recommendation := range result.Recommendations {
18-
fmt.Println("R: ", recommendation)
15+
major, minor = getMajorMinorVersion("90612")
16+
if major != "9.6" || minor != "12" {
17+
t.Fatal("TestGetMajorMinorVersion failed")
1918
}
2019
}
2120

@@ -24,18 +23,18 @@ func TestA002Sucess(t *testing.T) {
2423
var report A002Report
2524
var hostResult A002ReportHostResult
2625
hostResult.Data = A002ReportHostResultData{
27-
Version: "PostgreSQL 9.6.22 on x86_64-pc-linux-gnu (Ubuntu 9.6.22-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
28-
ServerVersionNum: "90622",
29-
ServerMajorVer: "9.6",
30-
ServerMinorVer: "22",
26+
Version: "PostgreSQL 11.3 on x86_64-pc-linux-gnu (Ubuntu 11.22-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
27+
ServerVersionNum: "110003",
28+
ServerMajorVer: "11",
29+
ServerMinorVer: "3",
3130
}
3231
report.Results = A002ReportHostsResults{"test-host": hostResult}
3332
result := A002Process(report)
3433
if result.P1 || result.P2 || result.P3 {
3534
t.Fatal("TestA002Sucess failed")
3635
}
37-
printConclusions(result)
38-
printReccomendations(result)
36+
checkup.PrintConclusions(result)
37+
checkup.PrintReccomendations(result)
3938
}
4039

4140
func TestA002IsSame(t *testing.T) {
@@ -44,24 +43,24 @@ func TestA002IsSame(t *testing.T) {
4443
var host1Result A002ReportHostResult
4544
var host2Result A002ReportHostResult
4645
host1Result.Data = A002ReportHostResultData{
47-
Version: "PostgreSQL 11.99 on x86_64-pc-linux-gnu (Ubuntu 11.99-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
48-
ServerVersionNum: "1199",
46+
Version: "PostgreSQL 11.3 on x86_64-pc-linux-gnu (Ubuntu 11.3-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
47+
ServerVersionNum: "110003",
4948
ServerMajorVer: "11",
50-
ServerMinorVer: "99",
49+
ServerMinorVer: "3",
5150
}
5251
host2Result.Data = A002ReportHostResultData{
53-
Version: "PostgreSQL 11.99 on x86_64-pc-linux-gnu (Ubuntu 11.99-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
54-
ServerVersionNum: "1199",
52+
Version: "PostgreSQL 11.3 on x86_64-pc-linux-gnu (Ubuntu 11.3-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
53+
ServerVersionNum: "110003",
5554
ServerMajorVer: "11",
56-
ServerMinorVer: "99",
55+
ServerMinorVer: "3",
5756
}
5857
report.Results = A002ReportHostsResults{"host1": host1Result, "host2": host2Result}
5958
result := A002Process(report)
6059
if result.P1 || result.P2 || result.P3 {
6160
t.Fatal("TestA002IsSame failed")
6261
}
63-
printConclusions(result)
64-
printReccomendations(result)
62+
checkup.PrintConclusions(result)
63+
checkup.PrintReccomendations(result)
6564
}
6665

6766
func TestA002IsNotSame(t *testing.T) {
@@ -86,25 +85,44 @@ func TestA002IsNotSame(t *testing.T) {
8685
if !result.P2 {
8786
t.Fatal("TestA002IsNotSame failed")
8887
}
89-
printConclusions(result)
90-
printReccomendations(result)
88+
checkup.PrintConclusions(result)
89+
checkup.PrintReccomendations(result)
9190
}
9291

9392
func TestA002WrongVersion(t *testing.T) {
9493
fmt.Println(t.Name())
9594
var report A002Report
9695
var hostResult A002ReportHostResult
9796
hostResult.Data = A002ReportHostResultData{
98-
Version: "PostgreSQL 9.2.22 on x86_64-pc-linux-gnu (Ubuntu 9.6.11-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
99-
ServerVersionNum: "90422",
100-
ServerMajorVer: "9.2",
101-
ServerMinorVer: "22",
97+
Version: "PostgreSQL 99.99.22 on x86_64-pc-linux-gnu (Ubuntu 9.6.11-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
98+
ServerVersionNum: "990099",
99+
ServerMajorVer: "99",
100+
ServerMinorVer: "99",
102101
}
103102
report.Results = A002ReportHostsResults{"test-host": hostResult}
104103
result := A002Process(report)
105104
if !result.P1 {
106105
t.Fatal("TestA002WrongVersion failed")
107106
}
108-
printConclusions(result)
109-
printReccomendations(result)
107+
checkup.PrintConclusions(result)
108+
checkup.PrintReccomendations(result)
109+
}
110+
111+
func TestA002LatestMajor(t *testing.T) {
112+
fmt.Println(t.Name())
113+
var report A002Report
114+
var hostResult A002ReportHostResult
115+
hostResult.Data = A002ReportHostResultData{
116+
Version: "PostgreSQL 9.6.22 on x86_64-pc-linux-gnu (Ubuntu 9.6.22-1.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit",
117+
ServerVersionNum: "90622",
118+
ServerMajorVer: "9.6",
119+
ServerMinorVer: "22",
120+
}
121+
report.Results = A002ReportHostsResults{"test-host": hostResult}
122+
result := A002Process(report)
123+
if !result.P3 {
124+
t.Fatal("TestA002LatestMajor failed")
125+
}
126+
checkup.PrintConclusions(result)
127+
checkup.PrintReccomendations(result)
110128
}

pghrep/src/checkup/a002/a002messages.go

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,38 @@ package a002
22

33
const VERSION_SOURCE_URL string = "https://git.postgresql.org/gitweb/?p=postgresql.git;a=tags"
44

5-
const MSG_WRONG_VERSION_CONCLUSION string = "[P1] Unknown PostgreSQL version %s on %s."
6-
const MSG_WRONG_VERSION_RECOMMENDATION string = "[P1] Check PostgreSQL version on %s."
7-
const MSG_NOT_SUPPORTED_VERSION_CONCLUSION string = "[P1] Postgres major version being used is %s and it is " +
8-
"NOT supported by Postgres community and PGDG (supported ended %s). This is a major issue. New bugs and security " +
5+
const MSG_WRONG_VERSION_CONCLUSION string = "[P1] Unknown PostgreSQL version `%s` on `%s`. \n"
6+
const MSG_WRONG_VERSION_RECOMMENDATION string = "[P1] Check PostgreSQL version on `%s`. \n"
7+
const MSG_NOT_SUPPORTED_VERSION_CONCLUSION string = "[P1] Postgres major version being used is `%s` and it is " +
8+
"NOT supported by Postgres community and PGDG (supported ended `%s`). This is a major issue. New bugs and security " +
99
"issues will not be fixed by community and PGDG. You are on your own! Read more: " +
10-
"[Versioning Policy](https://www.postgresql.org/support/versioning/)."
11-
const MSG_NOT_SUPPORTED_VERSION_RECOMMENDATION string = "[P1] Please upgrade Postgres version %s to one of the " +
10+
"[Versioning Policy](https://www.postgresql.org/support/versioning/). \n"
11+
const MSG_NOT_SUPPORTED_VERSION_RECOMMENDATION string = "[P1] Please upgrade Postgres version `%s` to one of the " +
1212
"versions supported by the community and PGDG. To minimize downtime, consider using pg_upgrade or one " +
13-
"of solutions for logical replication."
14-
const MSG_LAST_YEAR_SUPPORTED_VERSION_CONCLUSION string = "[P2] Postgres community and PGDG will stop supporting version %s" +
15-
" within the next 12 months (end of life is scheduled %s). After that, you will be on your own!"
16-
const MSG_SUPPORTED_VERSION_CONCLUSION string = "Postgres major version being used is %s and it is " +
13+
"of solutions for logical replication. \n"
14+
const MSG_LAST_YEAR_SUPPORTED_VERSION_CONCLUSION string = "[P2] Postgres community and PGDG will stop supporting version `%s`" +
15+
" within the next 12 months (end of life is scheduled `%s`). After that, you will be on your own! \n"
16+
const MSG_SUPPORTED_VERSION_CONCLUSION string = "Postgres major version being used is `%s` and it is " +
1717
"currently supported by Postgres community and PGDG (end of life is scheduled %s). It means that in case " +
1818
"of bugs and security issues, updates (new minor versions) with fixes will be released and available for use." +
19-
" Read more: [Versioning Policy](https://www.postgresql.org/support/versioning/)."
20-
const MSG_LAST_MINOR_VERSION_CONCLUSION string = "%s is the most up-to-date Postgres minor version in the branch %s."
21-
const MSG_NOT_LAST_MINOR_VERSION_CONCLUSION_1 string = "[P2] The minor version being used (%s) is not up-to-date (%s)."
22-
const MSG_NOT_LAST_MINOR_VERSION_CONCLUSION_N string = "[P2] The minor versions being used (%s) are not up-to-date (%s)."
23-
const MSG_NOT_ALL_VERSIONS_SAME_CONCLUSION_1 string = "[P2] Not all nodes have the same Postgres version. Node %s uses Postgres %s."
24-
const MSG_NOT_ALL_VERSIONS_SAME_CONCLUSION_N string = "[P2] Not all nodes have the same Postgres version. Nodes %s uses Postgres %s respectively."
25-
const MSG_NOT_ALL_VERSIONS_SAME_RECOMMENDATION string = "[P2] Please upgrade Postgres so its versions on all nodes match."
26-
const MSG_ALL_VERSIONS_SAME_CONCLUSION string = "All nodes have the same Postgres version (%s)."
19+
" Read more: [Versioning Policy](https://www.postgresql.org/support/versioning/). \n"
20+
const MSG_NOT_LAST_MAJOR_VERSION_CONCLUSION string = "[P3] Upgrade to the newest major version: %.0f. It has a lot of new features and improvements. \n"
2721

28-
const MSG_NOT_LAST_MINOR_VERSION_RECOMMENDATION string = "[P2] Please upgrade Postgres to the most recent minor version: %s."
29-
const MSG_NO_RECOMMENDATION string = "No recommendations."
30-
const MSG_GENERAL_RECOMMENDATION string = " \n" +
22+
const MSG_LAST_MINOR_VERSION_CONCLUSION string = "`%s` is the most up-to-date Postgres minor version in the branch `%s`. \n"
23+
const MSG_NOT_LAST_MINOR_VERSION_CONCLUSION_1 string = "[P2] The minor version being used (`%s`) is not up-to-date (the newest version: `%s`). \n"
24+
const MSG_NOT_LAST_MINOR_VERSION_CONCLUSION_N string = "[P2] The minor versions being used (`%s`) are not up-to-date (the newest version: `%s`). \n"
25+
const MSG_NOT_ALL_VERSIONS_SAME_CONCLUSION_1 string = "[P2] Not all nodes have the same Postgres version. Node `%s` uses Postgres `%s`. \n"
26+
const MSG_NOT_ALL_VERSIONS_SAME_CONCLUSION_N string = "[P2] Not all nodes have the same Postgres version. Nodes `%s` uses Postgres `%s`. \n"
27+
const MSG_NOT_ALL_VERSIONS_SAME_RECOMMENDATION string = "[P2] Please upgrade Postgres so its versions on all nodes match. \n"
28+
const MSG_ALL_VERSIONS_SAME_CONCLUSION string = "All nodes have the same Postgres version (`%s`). \n"
29+
30+
const MSG_NOT_LAST_MINOR_VERSION_RECOMMENDATION string = "[P2] Consider performing upgrade to the newest minor version: `%s`. \n"
31+
const MSG_NO_RECOMMENDATION string = "No recommendations. \n"
32+
const MSG_GENERAL_RECOMMENDATION_1 string = " \n" +
3133
"For more information about minor and major upgrades see: \n" +
32-
" - Official documentation: https://www.postgresql.org/docs \n" + ///XX.YY/upgrading.html
33-
" - [Major-version upgrading with minimal downtime](https://www.depesz.com/2016/11/08/major-version-upgrading-with-minimal-downtime/) (depesz.com) \n" +
34-
" - [Upgrading PostgreSQL on AWS RDS with minimum or zero downtime](https://medium.com/preply-engineering/postgres-multimaster-34f2446d5e14) \n" +
35-
" - [Near-Zero Downtime Automated Upgrades of PostgreSQL Clusters in Cloud](https://www.2ndquadrant.com/en/blog/near-zero-downtime-automated-upgrades-postgresql-clusters-cloud/) (2ndQuadrant.com) \n" +
36-
" - [Updating a 50 terabyte PostgreSQL database](https://medium.com/adyen/updating-a-50-terabyte-postgresql-database-f64384b799e7) \n"
34+
" - Official documentation: https://www.postgresql.org/docs/current/upgrading.html \n"
35+
36+
const MSG_GENERAL_RECOMMENDATION_2 string = " - [Major-version upgrading with minimal downtime](https://www.depesz.com/2016/11/08/major-version-upgrading-with-minimal-downtime/) (depesz.com) \n" +
37+
" - [Upgrading PostgreSQL on AWS RDS with minimum or zero downtime](https://medium.com/preply-engineering/postgres-multimaster-34f2446d5e14) \n" +
38+
" - [Near-Zero Downtime Automated Upgrades of PostgreSQL Clusters in Cloud](https://www.2ndquadrant.com/en/blog/near-zero-downtime-automated-upgrades-postgresql-clusters-cloud/) (2ndQuadrant.com) \n" +
39+
" - [Updating a 50 terabyte PostgreSQL database](https://medium.com/adyen/updating-a-50-terabyte-postgresql-database-f64384b799e7) \n"

0 commit comments

Comments
 (0)