Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d96bb9

Browse files
committed
Initialize pad bytes in GinFormTuple().
Every other core buffer page consumer initializes the bytes it furnishesto PageAddItem(). For consistency, do the same here. No back-patch;regardless, we couldn't count on the fix so long as binary upgrade cancarry forward affected index builds.
1 parentd53f7cf commit1d96bb9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/access/gin/ginentrypage.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ GinFormTuple(GinState *ginstate,
112112
if (newsize!=IndexTupleSize(itup))
113113
{
114114
itup=repalloc(itup,newsize);
115+
/*
116+
* PostgreSQL 9.3 and earlier did not clear this new space, so we
117+
* might find uninitialized padding when reading tuples from disk.
118+
*/
119+
memset((char*)itup+IndexTupleSize(itup),
120+
0,newsize-IndexTupleSize(itup));
115121

116122
/* set new size in tuple header */
117123
itup->t_info &= ~INDEX_SIZE_MASK;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp