pgsql: Protect against torn pages when deleting GIN list pages. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Protect against torn pages when deleting GIN list pages.
Date
Msg-id E1WiMuD-0000F8-GX@gemulon.postgresql.org
Whole thread Raw
List 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
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/be7830596f333b70243661b70e09a783ed57b497

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


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Protect against torn pages when deleting GIN list pages.
Next
From: Tom Lane
Date:
Subject: pgsql: Allow for platforms that have optreset but not .