diff --git a/internal/command/postgres/db.go b/internal/command/postgres/db.go index d0124a1343..f12c1178b1 100644 --- a/internal/command/postgres/db.go +++ b/internal/command/postgres/db.go @@ -131,7 +131,7 @@ func listDBs(ctx context.Context, leaderIP string) error { return render.JSON(io.Out, databases) } - rows := make([][]string, len(databases)) + rows := make([][]string, 0, len(databases)) for _, db := range databases { var users string for index, name := range db.Users { diff --git a/internal/command/postgres/users.go b/internal/command/postgres/users.go index 1abeac4821..5dadda240d 100644 --- a/internal/command/postgres/users.go +++ b/internal/command/postgres/users.go @@ -131,7 +131,7 @@ func renderUsers(ctx context.Context, leaderIP string) error { return render.JSON(io.Out, users) } - rows := make([][]string, len(users)) + rows := make([][]string, 0, len(users)) for _, user := range users { var databases string