pgsql: Fix assorted bugs in GIN's WAL replay logic.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix assorted bugs in GIN's WAL replay logic.
Date: 2010-10-11 23:05:52
Message-ID: E1P5RRI-00007D-J4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix assorted bugs in GIN's WAL replay logic.

The original coding was quite sloppy about handling the case where
XLogReadBuffer fails (because the page has since been deleted). This
would result in either "bad buffer id: 0" or an Assert failure during
replay, if indeed the page were no longer there. In a couple of places
it also neglected to check whether the change had already been applied,
which would probably result in corrupted index contents. I believe that
bug #5703 is an instance of the first problem. These issues could show up
without replication, but only if you were unfortunate enough to crash
between modification of a GIN index and the next checkpoint.

Back-patch to 8.2, which is as far back as GIN has WAL support.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=3b6eb752d99360e4e21ddff2c3edf750ab9b026a

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 308 ++++++++++++++++++++++----------------
1 files changed, 181 insertions(+), 127 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-10-12 02:17:34 pgsql: Fix plpython so that it again honors typmod while assigning to t
Previous Message Tom Lane 2010-10-11 03:20:55 pgsql: Improve the planner's simplification of NOT constructs.