Fix full-page writes of internal GIN pages.
authorHeikki Linnakangas <[email protected]>
Tue, 3 Dec 2013 20:13:16 +0000 (22:13 +0200)
committerHeikki Linnakangas <[email protected]>
Tue, 3 Dec 2013 21:01:31 +0000 (23:01 +0200)
commit760606dc5820fa9a849929e4ef35b98b2cdc9994
treee6a33b05b4591a69e3344c4b23d57fc4069e7506
parentad670a5d7344b81633ab6ac9efd150f5caac97c2
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.
src/backend/access/gin/gindatapage.c
src/backend/access/gin/ginentrypage.c