Protect against torn pages when deleting GIN list pages.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 34572920c92680b8c29779060632d7f40168cae2
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2014-05-08T11:43:04Z
Releases: 9.3.5
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.

Files

PathChange+/−
src/backend/access/gin/ginxlog.c modified +13 −13