Re: pg_stat_all_tables vs NULLs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_stat_all_tables vs NULLs
Date
Msg-id 26534.1228265561@sss.pgh.pa.us
Whole thread Raw
In response to pg_stat_all_tables vs NULLs  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pg_stat_all_tables vs NULLs  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> I've noticed that pg_stat_all_tables returns NULL for idx_scan and
> idx_tup_fetch if there are no indexes present on a table.

> Is this actually intended, or is that something that should be fixed?

Hmm.  I suspect it's an implementation artifact rather than something
that was consciously chosen, but on reflection it doesn't seem like a
bad thing.  If we just COALESCE'd it to zero (which I assume is what
you have in mind) then there would be no distinction in the view
between "you have no indexes" and "there are indexes but they aren't
being used".

I'd vote to leave it alone, I think.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: PiTR and other architectures....
Next
From: Tom Lane
Date:
Subject: Re: maintenance memory vs autovac