Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 092721337B9E for ; Tue, 1 Mar 2011 18:00:20 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 27336-01; Tue, 1 Mar 2011 22:00:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from a.mail.sonic.net (a.mail.sonic.net [64.142.16.245]) by mail.postgresql.org (Postfix) with ESMTP id 45A101337B93; Tue, 1 Mar 2011 18:00:12 -0400 (AST) Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id p21LHjea010906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Mar 2011 13:17:45 -0800 Received: from bolt.sonic.net (IDENT:K7OGyWxTo7KNqlASkV9fPdSyjs8g0qpR@localhost.localdomain [127.0.0.1]) by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id p21LHjwI001618; Tue, 1 Mar 2011 13:17:45 -0800 Received: (from daveg@localhost) by bolt.sonic.net (8.13.6/8.12.1/Submit) id p21LHjni001617; Tue, 1 Mar 2011 13:17:45 -0800 Date: Tue, 1 Mar 2011 13:17:45 -0800 From: daveg To: David Christensen Cc: Heikki Linnakangas , Maxim Boguk , Fujii Masao , pgsql-admin@postgresql.org, PostgreSQL-development Subject: Re: [HACKERS] Re: PD_ALL_VISIBLE flag was incorrectly set happend during repeatable vacuum Message-ID: <20110301211745.GM26397@sonic.net> References: <4D2D6A56.9060808@enterprisedb.com> <20110228212832.GH26397@sonic.net> <1B3CCBDD-4AC6-404A-9E26-DB4CA2554228@endpoint.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1B3CCBDD-4AC6-404A-9E26-DB4CA2554228@endpoint.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/11 X-Sequence-Number: 36883 On Mon, Feb 28, 2011 at 07:43:39PM -0600, David Christensen wrote: > > On Feb 28, 2011, at 3:28 PM, daveg wrote: > > > Anything new on this? I'm seeing at on one of my clients production boxes. > > Also, what is the significance, ie what is the risk or damage potential if > > this flag is set incorrectly? > > > Was this cluster upgraded to 8.4.4 from 8.4.0? It sounds to me like a known bug in 8.4.0 which was fixed by this commit: > > commit 7fc7a7c4d082bfbd579f49e92b046dd51f1faf5f > Author: Tom Lane > Date: Mon Aug 24 02:18:32 2009 +0000 > > Fix a violation of WAL coding rules in the recent patch to include an > "all tuples visible" flag in heap page headers. The flag update *must* > be applied before calling XLogInsert, but heap_update and the tuple > moving routines in VACUUM FULL were ignoring this rule. A crash and > replay could therefore leave the flag incorrectly set, causing rows > to appear visible in seqscans when they should not be. This might explain > recent reports of data corruption from Jeff Ross and others. > > In passing, do a bit of editorialization on comments in visibilitymap.c. > > oy:postgresql machack$ git describe --tag 7fc7a7c4d082bfbd579f49e92b046dd51f1faf5f > REL8_4_0-190-g7fc7a7c > > If the flag got twiddled while running as 8.4.0, the incorrect PD_ALL_VISIBLE flag would (obviously) not be fixed by the upgrade to 8.4.4. (Is this a separate issue?) This cluster was installed with 8.4.4. So it is still an existing problem. Also, to my recollection, this cluster has never crashed. -dg -- David Gould daveg@sonic.net 510 536 1443 510 282 0869 If simplicity worked, the world would be overrun with insects.