Skip to content

Commit

Permalink
Fix alignment of GIN in-line posting lists stored in entry tuples.
Browse files Browse the repository at this point in the history
The Sparc machines in the buildfarm are crashing because of misaligned
access to posting lists stored in entry tuples.

I accidentally removed a critical SHORTALIGN() from ginFormTuple, as part
of the packed posting lists patch. Perhaps I thought it was unnecessary,
because the index_form_tuple() call above the SHORTALIGN already aligned
the size, missing the fact that the null-category byte makes it misaligned
again (I think the SHORTALIGN is indeed unnecessary if there's no null-
category byte, but let's just play it safe...)
  • Loading branch information
hlinnaka committed Jan 23, 2014
1 parent 0fdb2f7 commit ec8f692
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/access/gin/ginentrypage.c
Expand Up @@ -87,6 +87,8 @@ GinFormTuple(GinState *ginstate,
newsize = Max(newsize, minsize);
}

newsize = SHORTALIGN(newsize);

GinSetPostingOffset(itup, newsize);
GinSetNPosting(itup, nipd);

Expand Down

0 comments on commit ec8f692

Please sign in to comment.