pgsql: Fix full-page writes of internal GIN pages.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix full-page writes of internal GIN pages.
Date: 2013-12-03 21:33:32
Message-ID: E1Vnxb2-0001Gn-9W@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix full-page writes of internal GIN pages.

Insertion to a non-leaf GIN page didn't make a full-page image of the page,
which is wrong. The code used to do it correctly, but was changed (commit
853d1c3103fa961ae6219f0281885b345593d101) because the redo-routine didn't
track incomplete splits correctly when the page was restored from a full
page image. Of course, that was not right way to fix it, the redo routine
should've been fixed instead. The redo-routine was surreptitiously fixed
in 2010 (commit 4016bdef8aded77b4903c457050622a5a1815c16), so all we need
to do now is revert the code that creates the record to its original form.

This doesn't change the format of the WAL record.

Backpatch to all supported versions.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/67fc33d3ad3b1afa12005a3866c43c6e6ce407c3

Modified Files
--------------
src/backend/access/gin/gindatapage.c | 42 +++++++++++++--------------------
src/backend/access/gin/ginentrypage.c | 42 +++++++++++++--------------------
2 files changed, 34 insertions(+), 50 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-12-03 22:04:48 Re: pgsql: Fix a couple of bugs in MultiXactId freezing
Previous Message Heikki Linnakangas 2013-12-03 21:33:31 pgsql: Fix full-page writes of internal GIN pages.