Re: PD_ALL_VISIBLE flag warning - Mailing list pgsql-admin

From Greg Stark
Subject Re: PD_ALL_VISIBLE flag warning
Date
Msg-id t2u407d949e1004072159yaf03feffu1c18e03d75859bba@mail.gmail.com
Whole thread Raw
In response to PD_ALL_VISIBLE flag warning  (Jonathan Foy <thefoy@gmail.com>)
Responses Re: PD_ALL_VISIBLE flag warning  (Jonathan Foy <thefoy@gmail.com>)
List pgsql-admin
On Thu, Apr 1, 2010 at 2:10 PM, Jonathan Foy <thefoy@gmail.com> wrote:
> Hello
>
> I came in this morning and noticed this warning sitting in my inbox quite a
> few times...
>
> WARNING:  PD_ALL_VISIBLE flag was incorrectly set in relation "table_2010q1"
> page 471118
> WARNING:  PD_ALL_VISIBLE flag was incorrectly set in relation "table_2010q1"
> page 471119
> WARNING:  PD_ALL_VISIBLE flag was incorrectly set in relation "table_2010q1"
> page 471120
> ....
>
> and I'm wondering how worked up I should be getting.

This is a warning about a fairly serious data corruption problem. In
the worst case prior queries returned incorrect results -- which if
those results were used to calculate subsequent updates could have
caused your data to be inconsistent.

Specifically, having that flag set would cause rows to be returned
which should not have been returned, either because they had been
deleted, the transaction inserting them aborted, or they had been
updated (causing duplicate copies of the same row to be returned).

There was a bug which could cause this in 8.4.0 but it was fixed in
8.4.1.  You say you're running 8.4.1 (you should be running 8.4.3
though none of the subsequent bug-fixes are as serious if the SSL
security vulnerability isn't relevant) so this is quite worrisome.
Nobody else has reported anything similar though.

Is it possible these pages have never been vacuumed since you updated
from 8.4.0 to 8.4.1? I'm not sure how likely that is. In 8.4 Postgres
tries to avoid vacuuming pages that don't need it so it's possible
this situation could live on for longer than in the past.

I think a regular "VACUUM" of every table should guarantee that any
remnants of this bug from 8.4.0 are cleaned up. If you do this and
possibly get some more warnings from it but never see it again
afterwards then I would assume they're leftovers from that old bug.

--
greg

pgsql-admin by date:

Previous
From: Kiswono Prayogo
Date:
Subject: Re: Compile Problem for Alpha 5 in /src/backend/utils/error/elog.c
Next
From: Renato Oliveira
Date:
Subject: Restore data to an existing populated table