Re: huge pgstat.stat file on PostgreSQL 8.3.24 - Mailing list pgsql-performance

From Huang, Suya
Subject Re: huge pgstat.stat file on PostgreSQL 8.3.24
Date
Msg-id D83E55F5F4D99B4A9B4C4E259E6227CD014A1450@AUX1EXC01.apac.experian.local
Whole thread Raw
In response to Re: huge pgstat.stat file on PostgreSQL 8.3.24  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: huge pgstat.stat file on PostgreSQL 8.3.24
Re: huge pgstat.stat file on PostgreSQL 8.3.24
List pgsql-performance
From: Pavel Stehule [mailto:pavel.stehule@gmail.com] 
Sent: Thursday, June 19, 2014 3:28 PM
To: Huang, Suya
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] huge pgstat.stat file on PostgreSQL 8.3.24

Hello

The size of statfile is related to size of database objects in database. Depends on PostgreSQL version this file can be
oneper database cluster or one per database (from 9.3),
 
These statistics should by reset by call pg_stat_reset()
http://www.postgresql.org/docs/9.2/static/monitoring-stats.html
Autovacuum on large stat files has significant overhead - it can be increasing by using new PostgreSQL (9.3) and by
migrationstat directory to ramdisk - by setting stats_temp_directory to some dir on ramdisk (tmpfs on Linux)
 
Regards

Pavel

2014-06-19 6:38 GMT+02:00 Huang, Suya <Suya.Huang@au.experian.com>:
Hi group,
 
We’ve found huge pgstat.stat file on our production DB boxes, the size is over 100MB. autovacuum is enabled. So my
questionwould be:
 
1.       What’s a reasonable size of pgstat.stat file, can it be estimated?
2.       What’s the safest way to reduce the file size to alleviate the IO impact on disk?
3.       If need to drop all statistics, would a “analyze DB” command enough to eliminate the performance impact on
queries?
 
Thanks,
Suya




Hi Pavel, 

our version is 8.3.24, not 9.3. I also want to know the impact caused by run pg_stat_reset to application, is that able
tobe mitigated by doing an analyze database command? 
 

Thanks,
Suya


pgsql-performance by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: huge pgstat.stat file on PostgreSQL 8.3.24
Next
From: Pavel Stehule
Date:
Subject: Re: huge pgstat.stat file on PostgreSQL 8.3.24