Fix bug in GIN posting tree root creation.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 07fca603b56e39c50478b44070fdfb38313cd51c
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2013-11-13T11:47:59Z
Releases: 9.4.0
Fix bug in GIN posting tree root creation.

The root page is filled with as many items as fit, and the rest are inserted
using normal insertions. However, I fumbled the variable names, and the code
actually memcpy'd all the items on the page, overflowing the buffer. While
at it, rename the variable to make the distinction more clear.

Reported by Teodor Sigaev. This bug was introduced by my recent
refactorings, so no backpatching required.

Files

PathChange+/−
src/backend/access/gin/gindatapage.c modified +9 −9