Wrong stat on pg_stat_user_tables

From: Thomas SIMON <tsimon(at)neteven(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Wrong stat on pg_stat_user_tables
Date: 2016-09-27 08:20:59
Message-ID: a028c320-32bc-612a-e656-30ee153994b3@neteven.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,

I have strange behavior with a stat of pg_stat_user_tables (explained
below), where number of live tuples is not the real number at all. (25M
vs 111M)

- select n_live_tup, last_autoanalyze from pg_stat_user_tables where
relname = 'items'

n_live_tup : 111 191 791
last_autoanalyze : 2016-09-27 04:03:35.09233+02

- select count (1) from items;
count
----------
25307071

I've comparated my 10 biggest tables, only this table gave me wrong results.

Does anyone have an idea about it ?

Thanks

--

Thomas

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2016-09-27 13:09:10 Re: /var/run/postgresql/.s.PGSQL.5432 should be 5433
Previous Message Poul Kristensen 2016-09-27 08:08:36 /var/run/postgresql/.s.PGSQL.5432 should be 5433