Re: pg_stat_all_tables vs NULLs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stat_all_tables vs NULLs
Date: 2008-12-03 00:52:41
Message-ID: 26534.1228265561@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-03 01:00:15 Re: maintenance memory vs autovac
Previous Message Philip Warner 2008-12-03 00:02:50 Re: PiTR and other architectures....