Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Anit Chakkarwar <anitchakkarwar(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate
Date: 2013-12-16 15:50:37
Message-ID: 20131216155037.GP2543@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Anit,

* Anit Chakkarwar (anitchakkarwar(at)gmail(dot)com) wrote:
> Now n_tup_del = 2, n_tup_ins=120, n_live_tup=20 in pg_stat_user_tables, but
> how can I figure out what has happened to 98 rows?

This is information for statistics- if you need an accurate count,
you'll need to use a trigger and track that information explicitly..
There can be other ways that n_tup_del can end up being inexact.

Thanks,

Stephen

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fleischhauer 2013-12-16 15:56:56 Re: permission issues with PostgreSQL 9.2 EnterpriseDB one-click installer on windows 7 causes initcluster to fail
Previous Message Anit Chakkarwar 2013-12-16 13:21:40 Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate