pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas SIMON <tsimon@neteven.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Wrong stat on pg_stat_user_tables
Date: Tue, 27 Sep 2016 10:20:59 +0200
Message-ID: <a028c320-32bc-612a-e656-30ee153994b3@neteven.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (4+ messages)  latest in thread

Message-ID: <a028c320-32bc-612a-e656-30ee153994b3@neteven.com>
Permalink:  ../a028c320-32bc-612a-e656-30ee153994b3@neteven.com/
Also on:    postgresql.org/message-id/a028c320-32bc-612a-e656-30ee153994b3@neteven.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tsimon@neteven.com
  Subject: Re: Wrong stat on pg_stat_user_tables
  In-Reply-To: <a028c320-32bc-612a-e656-30ee153994b3@neteven.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox