Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T5scj-0002P4-Fj for pgsql-bugs@postgresql.org; Mon, 27 Aug 2012 06:16:33 +0000 Received: from smtpr.163.net ([202.108.255.208]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1T5scd-0004sf-GH for pgsql-bugs@postgresql.org; Mon, 27 Aug 2012 06:16:30 +0000 Received: from [127.0.0.1] (unknown [116.227.188.225]) by bjfee_app2 (Coremail) with SMTP id GkBFlbkQO1A1ALzh.3 for ; Mon, 27 Aug 2012 14:16:45 +0800 (CST) X-Originating-IP: [116.227.188.225] Message-ID: <503B10A1.8050605@163.net> Date: Mon, 27 Aug 2012 14:16:01 +0800 From: =?UTF-8?B?5rKI5YmN5Y2r?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Euler Taveira CC: pgsql-bugs@postgresql.org Subject: Re: BUG #7504: corrupted statistics file "pg_stat_tmp/pgstat.stat" References: <50378E29.2000704@timbira.com> In-Reply-To: <50378E29.2000704@timbira.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201208/198 X-Sequence-Number: 33922 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. > >