Skip to content

Commit

Permalink
✨ Run ANALYZE after database restore
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Dec 8, 2021
1 parent 2fbc139 commit c3b380f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c3b380f

Please sign in to comment.