I would like to know the particular table's insert,update and delete record history. I have done some googling and got to know about pg_stat_all_tables and pg_stat_user_tables. These tables having this below field , which has the tables insert,update and delete history,
But some time It was getting reset.. I don't know which scenario It is happening.
Done the blow testing:
=> inserting,updating and deleting some record in a particular table => checked this pg_stat_all_tables entry, It has displayed perfect count of the history. => restarted the server for check the these (n_tup_ins,n_tup_upd,n_tup_del) entries. but values weren't reseted, history remains. => Two days after I have checked this pg_stat_all_tables entry again, but proper records wasn't there. Value of n_tup_ins,n_tup_upd and n_tup_del was 0. I don't know why it has happened.
Please let me know the reason and which scenario it will get reset. Whether I have to do any configuration related changes ?
Note:
I am using PostgreSQL 8.3.7.
In PostgreSQL, pg_stat tables shows a variety of statistical information regarding the database.
psql=# select pg_stat_reset();
Whenever you perform above command in PSQL prompt,it will clear out the gathered statistics and start from scratch. Could you please check it in your end.