pgsql: Don't throw a warning if vacuum sees PD_ALL_VISIBLE flag set on

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't throw a warning if vacuum sees PD_ALL_VISIBLE flag set on
Date: 2011-03-08 19:00:22
Message-ID: E1Px28s-0007aJ-5u@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't throw a warning if vacuum sees PD_ALL_VISIBLE flag set on a page that
contains newly-inserted tuples that according to our OldestXmin are not
yet visible to everyone. The value returned by GetOldestXmin() is conservative,
and it can move backwards on repeated calls, so if we see that contradiction
between the PD_ALL_VISIBLE flag and status of tuples on the page, we have to
assume it's because an earlier vacuum calculated a higher OldestXmin value,
and all the tuples really are visible to everyone.

We have received several reports of this bug, with the "PD_ALL_VISIBLE flag
was incorrectly set in relation ..." warning appearing in logs. We were
finally able to hunt it down with David Gould's help to run extra diagnostics
in an environment where this happened frequently.

Also reword the warning, per Robert Haas' suggestion, to not imply that the
PD_ALL_VISIBLE flag is necessarily at fault, as it might also be a symptom
of corruption on a tuple header.

Backpatch to 8.4, where the PD_ALL_VISIBLE flag was introduced.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/994940f2fb2678b89b4897d6cd7e0bfd67c07859

Modified Files
--------------
src/backend/commands/vacuumlazy.c | 20 ++++++++++++++++++--
src/backend/storage/ipc/procarray.c | 12 ++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-03-08 19:06:48 pgsql: Fix overly strict assertion in SummarizeOldestCommittedSxact().
Previous Message Bruce Momjian 2011-03-08 17:54:35 pgsql: Adjust CHAR() doc mention of pattern matching issues for trailin