pgsql: Protect against torn pages when deleting GIN list pages.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Protect against torn pages when deleting GIN list pages.
Date: 2014-05-08 11:54:29
Message-ID: E1WiMuD-0000F6-F9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Protect against torn pages when deleting GIN list pages.

To-be-deleted list pages contain no useful information, as they are being
deleted, but we must still protect the writes from being torn by a crash
after a partial write. To do that, re-initialize the pages on WAL replay.

Jeff Janes caught this with a test program to test partial writes.
Backpatch to all supported versions.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8b4efe1f3a4373c9442a710fb01b14c445749d6a

Modified Files
--------------
src/backend/access/gin/ginxlog.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-05-08 16:33:35 pgsql: Allow for platforms that have optreset but not <getopt.h>.
Previous Message Heikki Linnakangas 2014-05-08 08:02:51 pgsql: Include files copied from libpqport in .gitignore