pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: daveg <daveg@sonic.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: David Christensen <david@endpoint.com>
Cc: Maxim Boguk <maxim.boguk@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-admin@postgresql.org, PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Re: PD_ALL_VISIBLE flag was incorrectly set happend during repeatable vacuum
Date: Thu, 03 Mar 2011 10:16:29 +0200
Message-ID: <4D6F4E5D.6080507@enterprisedb.com> (raw)
In-Reply-To: <20110303071208.GA4053@sonic.net>
References: <AANLkTino+Gc2vvOVdzCPRRXW-N7R5=ikYMnNKT5W=mk1@mail.gmail.com>
	<AANLkTikw==USr3+4Mt+w97P3ymux-Bhn0G7Ad0ZJHbqG@mail.gmail.com>
	<4D2D6A56.9060808@enterprisedb.com>
	<20110228212832.GH26397@sonic.net>
	<1B3CCBDD-4AC6-404A-9E26-DB4CA2554228@endpoint.com>
	<AANLkTi=xq4SV6jwA7txvrbEWocyeiU6XiTG=-zVy+7Dq@mail.gmail.com>
	<AANLkTi=Ye7AoF7_uVQfPVn-ok2VOp65mi0xU3H7kCke3@mail.gmail.com>
	<20110303071208.GA4053@sonic.net>

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.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Attachments:

dont-trust-all-visible-flag.patch (text/x-diff, 632B) download diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 7dcc601..d53aede 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -255,6 +255,11 @@ heapgetpage(HeapScanDesc scan, BlockNumber page) * transaction in the standby. */ all_visible = PageIsAllVisible(dp) && !snapshot->takenDuringRecovery; + /* + * XXX: there seems to be something wrong with the way the flag is set, + * so don't trust it. Remove this when the cause is found. + */ + all_visible = false; for (lineoff = FirstOffsetNumber, lpp = PageGetItemId(dp, lineoff); lineoff <= lines;

view thread (32+ messages)  latest in thread

Message-ID: <4D6F4E5D.6080507@enterprisedb.com>
Permalink:  ../4D6F4E5D.6080507@enterprisedb.com/
Also on:    postgresql.org/message-id/4D6F4E5D.6080507@enterprisedb.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, daveg@sonic.net, robertmhaas@gmail.com, gsstark@mit.edu, david@endpoint.com, maxim.boguk@gmail.com, masao.fujii@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Re: PD_ALL_VISIBLE flag was incorrectly set happend during repeatable vacuum
  In-Reply-To: <4D6F4E5D.6080507@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox