BUG #7504: corrupted statistics file "pg_stat_tmp/pgstat.stat"

Поиск
Список
Период
Сортировка
Искать

BUG #7504: corrupted statistics file "pg_stat_tmp/pgstat.stat"

От:
shenqw@163.net
Дата:
The following bug has been logged on the website:

Bug reference:      7504
Logged by:          shenqw
Email address:      shenqw@163.net
PostgreSQL version: 9.1.5
Operating system:   FreeBSD 9.1 P4
Description:        =


Aug 23 11:12:11 www postgres[32088]: [2-1] WARNING:  corrupted statistics
file "pg_stat_tmp/pgstat.stat"
Aug 23 11:12:11 www postgres[32088]: [3-1] WARNING:  corrupted statistics
file "pg_stat_tmp/pgstat.stat"
......
Aug 24 05:51:52 www postgres[32088]: [543-1] WARNING:  corrupted statistics
file "pg_stat_tmp/pgstat.stat"
Aug 24 05:51:52 www postgres[32088]: [544-1] WARNING:  corrupted statistics
file "pg_stat_tmp/pgstat.stat"

**********************

pgsql   32088   0.0  1.6 584548  33724  ??  Ss   Thu10am     0:06.84
postgres: autovacuum launcher process    (postgres)

***********************

Maybe this is a bug.
if stats collector process don't product pg_stat_tmp/pgstat.stat file, the
autovacuum launcher process will output those WARNING message?

Re: BUG #7504: corrupted statistics file "pg_stat_tmp/pgstat.stat"

От:
Euler Taveira <euler@timbira.com>
Дата:
On 24-08-2012 00:16, shenqw@163.net wrote:
> Maybe this is a bug.
> if stats collector process don't product pg_stat_tmp/pgstat.stat file, the
> autovacuum launcher process will output those WARNING message?
> 
It is possible but... Did you see any ERROR message(s) related to statistics
collector before those ones? To solver your problem, you can remove the
pgstat.stat file that it will be created again next time server starts. Of
course, you will loose the statistics, hence remember to VACUUM ANALYZE your
cluster.


-- 
   Euler Taveira de Oliveira - Timbira       http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: BUG #7504: corrupted statistics file "pg_stat_tmp/pgstat.stat"

От:
沈前卫 <shenqw@163.net>
Дата:
My English is very poor, below Google Translate:


"It is possible but ... Did you see any ERROR message (s) related to 
statistics
collector before those ones? "
-------
Found no other error messages related to this. Disk hardware is also normal.



According to my observation, is the process of "autovacuum launcher 
process" will prompt the above error, if error, suggesting that the 
number of errors is relatively fixed, 182, such as 2-182, the next 
prompt serial number becomes 183-363, and then the next time on 364-544.

I Postgresql code are not familiar with, and probably looked, the "stats 
collector process" process to create a "pgstat.tmp" write data, and then 
rename the "pgstat.stat" atomic operations, but if "autovacuum launcher 
process" is being read "pgstat.stat", "stats collector process" at a 
time when the rename operation if integrated autovacuum launcher process 
"read the remaining old files or new data file? Is not a problem. If it 
is to solve this problem need to process synchronization mechanism to 
solve. Only do not have any process to read the file being read 
"pgstat.stat", this time to rename operation. This is also the 
possibility of error, but the probability is very small. If you want to 
completely eliminate this error, you need better synchronization mechanism.


于 2012-8-24 22:22, Euler Taveira 写道:
> On 24-08-2012 00:16, shenqw@163.net wrote:
>> Maybe this is a bug.
>> if stats collector process don't product pg_stat_tmp/pgstat.stat file, the
>> autovacuum launcher process will output those WARNING message?
>>
> It is possible but... Did you see any ERROR message(s) related to statistics
> collector before those ones? To solver your problem, you can remove the
> pgstat.stat file that it will be created again next time server starts. Of
> course, you will loose the statistics, hence remember to VACUUM ANALYZE your
> cluster.
>
>




FAQ