Protect against torn pages when deleting GIN list pages.
authorHeikki Linnakangas <[email protected]>
Thu, 8 May 2014 11:43:04 +0000 (14:43 +0300)
committerHeikki Linnakangas <[email protected]>
Thu, 8 May 2014 11:44:06 +0000 (14:44 +0300)
commit8b4efe1f3a4373c9442a710fb01b14c445749d6a
treeb3365f2ded53ead7c8ee66695dad62500a331a15
parent77e66282769b4e6df181210cc24ab2073f123eb7
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.
src/backend/access/gin/ginxlog.c