diff --git a/cmd/restore/restore.go b/cmd/restore/restore.go index 931950a6..78b497d6 100644 --- a/cmd/restore/restore.go +++ b/cmd/restore/restore.go @@ -110,7 +110,18 @@ func run(cmd *cobra.Command, args []string) (err error) { err := kubernetes.Exec(client, postgresPod, buildCommand(inputFormat, true), pr, os.Stdout, false) pw.Close() - ch <- err + if err != nil { + ch <- err + return + } + + err = kubernetes.Exec(client, postgresPod, buildCommand(sqlformat.Plain, false), strings.NewReader("analyze"), os.Stdout, false) + if err != nil { + ch <- err + return + } + + ch <- nil }() switch inputFormat {