Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CB420133616B for ; Fri, 4 Mar 2011 05:02:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 10499-01; Fri, 4 Mar 2011 09:02:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by mail.postgresql.org (Postfix) with ESMTP id 828721337BBB; Fri, 4 Mar 2011 05:02:17 -0400 (AST) Received: from newshell.sonic.net (bolt.sonic.net [208.201.242.19]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id p24923rK024818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Mar 2011 01:02:03 -0800 Received: from bolt.sonic.net (IDENT:Con7MjJ/DjRwBt85XIasIeFEkwrz91HJ@localhost.localdomain [127.0.0.1]) by newshell.sonic.net (8.13.6/8.12.1) with ESMTP id p24923hK010570; Fri, 4 Mar 2011 01:02:03 -0800 Received: (from daveg@localhost) by bolt.sonic.net (8.13.6/8.12.1/Submit) id p24923iq010565; Fri, 4 Mar 2011 01:02:03 -0800 Date: Fri, 4 Mar 2011 01:02:03 -0800 From: daveg To: Merlin Moncure Cc: Heikki Linnakangas , Robert Haas , Greg Stark , David Christensen , 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: <20110304090203.GF4053@sonic.net> References: <4D2D6A56.9060808@enterprisedb.com> <20110228212832.GH26397@sonic.net> <1B3CCBDD-4AC6-404A-9E26-DB4CA2554228@endpoint.com> <20110303071208.GA4053@sonic.net> <4D6F4E5D.6080507@enterprisedb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/38 X-Sequence-Number: 36910 On Thu, Mar 03, 2011 at 09:04:04AM -0600, Merlin Moncure wrote: > On Thu, Mar 3, 2011 at 2:16 AM, Heikki Linnakangas > wrote: > > On 03.03.2011 09:12, daveg wrote: > >> > >> Question: what would be the consequence of simply patching out the setting > >> of this flag? Assuming that the incorrect PD_ALL_VISIBLE flag is the only > >> problem (big assumption perhaps) then simply never setting it would at > >> least > >> avoid the possibility of returning wrong answers, presumably at some > >> performance cost. We possibly could live with that until we get a handle > >> on the real cause and fix. > > > > Yes. With that assumption. > > > > If you really want to do that, I would suggest the attached patch instead. > > This just disables the optimization in seqscans to trust it, so an > > incorrectly set flag won't affect correctness of query results, but the > > flag is still set as usual and you still get the warnings so that we can > > continue to debug the issue. > > This. The mis-set flag can is likely a bug/concurrency issue etc, > but could also be a symptom of more sinister data corruption. I did > various vacuum experiments all day yesterday on my windows workstation > and was not able to produce any mis-flags. I trust iscsi more than > nfs, but maybe there is a connection here that is hardware based. hm. > do you think it would be helpful to know what is causing the > all_visible flag to get flipped? If so, the attached patch shows > which case is throwing it... I'll apply your patch and try it. Probably can only do it for a few minutes tomorrow evening though as the output is huge and we have only limited down time availability. -dg -- David Gould daveg@sonic.net 510 536 1443 510 282 0869 If simplicity worked, the world would be overrun with insects.