diff --git a/files/gitlab-ctl-commands/pg-upgrade.rb b/files/gitlab-ctl-commands/pg-upgrade.rb
index 3acd2aa078cb3fe9be81fc106776d4b95e65cc26_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy9wZy11cGdyYWRlLnJi..84093d5ed57548df4fca62617cfa7b31094cff4f_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy9wZy11cGdyYWRlLnJi 100644
--- a/files/gitlab-ctl-commands/pg-upgrade.rb
+++ b/files/gitlab-ctl-commands/pg-upgrade.rb
@@ -612,7 +612,7 @@
   rescue Mixlib::ShellOut::CommandTimeout
     $stderr.puts "Time out while running the analyze stage.".color(:yellow)
     $stderr.puts "Please re-run the command manually as the #{pg_username} user".color(:yellow)
-    $stderr.puts analyze_command.color(:yellow)
+    $stderr.puts analyze_cmd.color(:yellow)
   end
 end