corrupted statistics file "pg_stat_tmp/pgstat.stat"

From: "Carl von Clausewitz" <clausewitz45(at)gmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: corrupted statistics file "pg_stat_tmp/pgstat.stat"
Date: 2012-08-15 07:57:25
Message-ID: !&!AAAAAAAAAAAuAAAAAAAAAAWTd+JxKBFOjwezc1xxLcwBAEi3FOTIpilNouXM9QUKMvAAAAA/8FYAABAAAACXAOORq4P1RK+X0zGDPc5cAQAAAAA=@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

I’ve just made a clean install for PostgreSQL 9.1 (postgresql-server-9.1.4, postgresql-contrib-9.1.4) on a FreeBSD 9 (FreeBSD 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root(at)amd64-builder(dot)daemonology(dot)net:/usr/obj/usr/src/sys/GENERIC amd64).

I’ve restored from TAR backup our databases, and everything looked fine. Without changing any setting in postgresql.conf (or in kernel settings) – only “track_counts=on”, after 2-3 days, I’m receiving huge number (~5-10 PCS in every second) of error messages like that in /var/log/postgresql.log:

*** Aug 15 06:27:26 eurodb postgres[77652]: [43-1] WARNING: corrupted statistics file "pg_stat_tmp/pgstat.stat"

The logs are going to the syslog, and there are no more Warning, Error, or other messages. If I do a full Vacuum on the database, and I restart the system, everything works fine, no more error messages, until 2-3 days – and everything starts from the beginning.

Two weeks ago, we just bought a new server, I’ve installed the same version of FreeBSD and PostgreSQL, and there is the same problem on that machine too – without any usage, or load, this is a test server for us now.

The disks (SATA3 HDD), and the controllers has been tested, they are OK. All the directories’ permissons are the defaults, pg_stat_temp is owned by pgsql:pgsql – so I think this is not a permission issue.

I’m trying to tune my config with pgtune, and I’ve made some changes on sysctl for the following:

kern.ipc.semmni="512"

kern.ipc.semmns="1024"

kern.ipc.semume="64"

kern.ipc.semmnu="512"

I will restart the machines today, and will see, what’s going on. Did anybody has seen this problem before? On our early version 9.0.8 PostgreSQL server, there wasn’t any kind of problem, but it was a FreeBSD 8.2. How can I investigate, what could be the problem? Kernel settings? Or any other idea?

Thank you in advance.

Best regards,

Csaba

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Loughrey, Hugh 2012-08-15 09:52:17 Check PostgreSQL status using MS-DOS bat file?
Previous Message Sergey Konoplev 2012-08-15 06:29:40 Re: cast name to oid