Skip to content

Commit

Permalink
lakefs diagnostics query db version (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder authored Nov 19, 2020
1 parent 2c137c6 commit 0f3084a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions diagnostics/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func (c *Collector) Collect(ctx context.Context, w io.Writer) (err error) {
}
}

err = c.writeRawQueryContent(ctx, writer, "db_version", `SELECT version();`)
if err != nil {
errs = append(errs, fmt.Errorf("get db version %w", err))
}

err = c.writeRawQueryContent(ctx, writer, "table_sizes", `
SELECT *, pg_size_pretty(total_bytes) AS total
, pg_size_pretty(index_bytes) AS INDEX
Expand Down

0 comments on commit 0f3084a

Please sign in to comment.