Re: pg_stats avg_width and null_frac

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Paul McGarry <paul(at)paulmcgarry(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_stats avg_width and null_frac
Date: 2018-06-06 01:04:39
Message-ID: CAKFQuwbxXumnVw7Njb07-PO8v9U4SkocwqUL5SN9VacwDJCgCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 5, 2018 at 5:49 PM, Paul McGarry <paul(at)paulmcgarry(dot)com> wrote:

> Can anyone confirm that the "avg_width" reported in the pg_stats is the
> avg_width not including any null rows?
>

​Yes.

https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_statistic.h#L40

It actually is documented but only on the underlying catalog, not the view.

https://www.postgresql.org/docs/10/static/catalog-pg-statistic.html

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexandre Arruda 2018-06-06 01:42:02 Re: ERROR: found multixact from before relminmxid
Previous Message Paul McGarry 2018-06-06 00:49:28 pg_stats avg_width and null_frac