Skip to content

Commit

Permalink
Add pgsql13 and update upstream support status for other versions.
Browse files Browse the repository at this point in the history
Also, print link with upstream Support Dates for already unsupported versions
and soon to be unsupported versions.
  • Loading branch information
mikelolasagasti authored and jfcoz committed Sep 26, 2020
1 parent d96412e commit 089f23c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions postgresqltuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -439,20 +439,27 @@ sub usage {
add_advice("version","high","If this instance is a production server, then only use stable versions");
}
my $pg_upgrade="Upgrade to the latest stable PostgreSQL version";
if (min_version('12.0')) {
my $pg_supportdates="Check https://www.postgresql.org/support/versioning/ for upstream support dates";
if (min_version('13.0')) {
print_report_ok("You are using the latest PostreSQL major version ($version)");
} elsif (min_version('12.0')) {
print_report_ok($pg_upgrade);
add_advice("version","low",$pg_upgrade);
} elsif (min_version('11.0')) {
print_report_ok($pg_upgrade);
add_advice("version","low",$pg_upgrade);
} elsif (min_version('10.0')) {
print_report_warn($pg_upgrade);
add_advice("version","low",$pg_upgrade);
} elsif (min_version('9.0')) {
add_advice("version","low",$pg_supportdates);
} elsif (min_version('9.5')) {
print_report_warn($pg_upgrade);
add_advice("version","medium",$pg_upgrade);
add_advice("version","medium",$pg_supportdates);
} elsif (min_version('8.1')) {
print_report_bad("You are using PostreSQL version $version, which is very old");
print_report_bad("You are using PostreSQL version $version, which is unsupported upstream");
add_advice("version","high",$pg_upgrade);
add_advice("version","high",$pg_supportdates);
} else {
print_report_bad("You are using PostreSQL version $version, which is very old and not supported by this script");
add_advice("version","high",$pg_upgrade);
Expand Down

0 comments on commit 089f23c

Please sign in to comment.