pgsql: Fix some more 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 some more bugs in GIN's WAL replay logic.
Date: 2012-02-26 20:12:51
Message-ID: E1S1kSh-0001CN-ME@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix some more bugs in GIN's WAL replay logic.

In commit 4016bdef8aded77b4903c457050622a5a1815c16 I fixed a bunch of
ginxlog.c bugs having to do with not handling XLogReadBuffer failures
correctly. However, in ginRedoUpdateMetapage and ginRedoDeleteListPages,
I unaccountably thought that failure to read the metapage would be
impossible and just put in an elog(PANIC) call. This is of course wrong:
failure is exactly what will happen if the index got dropped (or rebuilt)
between creation of the WAL record and the crash we're trying to recover
from. I believe this explains Nicholas Wilson's recent report of these
errors getting reached.

Also, fix memory leak in forgetIncompleteSplit. This wasn't of much
concern when the code was written, but in a long-running standby server
page split records could be expected to accumulate indefinitely.

Back-patch to 8.4 --- before that, GIN didn't have a metapage.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5ce0a842a6e93ecb453490dc1b6a578b40da1630

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2012-02-26 22:07:31 Re: pgsql: Don't install hstore--1.0.sql any more.
Previous Message Peter Eisentraut 2012-02-26 13:31:30 pgsql: Remove useless cast