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

Commite1a93dd

Browse files
committed
tqueue.c's record-typmod hashtables need the HASH_BLOBS option.
The keys are integers, not strings. The code accidentally worked onlittle-endian machines, at least up to 256 distinct record types withina session, but failed utterly on big-endian. This was unexpectedlyexposed by a test case added by commit4452000, which apparently is theonly parallelizable query in the regression suite that uses more than oneanonymous record type. Fortunately, buildfarm member mandrill isbig-endian and is running with force_parallel_mode on, so it failed.
1 parent69995c3 commite1a93dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/executor/tqueue.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ tqueueSendTypmodInfo(TQueueDestReceiver *tqueue, int typmod,
402402
ctl.entrysize=sizeof(int);
403403
ctl.hcxt=TopMemoryContext;
404404
tqueue->recordhtab=hash_create("tqueue record hashtable",
405-
100,&ctl,HASH_ELEM |HASH_CONTEXT);
405+
100,&ctl,
406+
HASH_ELEM |HASH_BLOBS |HASH_CONTEXT);
406407
}
407408

408409
/* Have we already seen this record type? If not, must report it. */
@@ -877,7 +878,8 @@ TupleQueueHandleControlMessage(TupleQueueReader *reader, Size nbytes,
877878
ctl.entrysize=sizeof(RecordTypemodMap);
878879
ctl.hcxt=CurTransactionContext;
879880
reader->typmodmap=hash_create("typmodmap hashtable",
880-
100,&ctl,HASH_ELEM |HASH_CONTEXT);
881+
100,&ctl,
882+
HASH_ELEM |HASH_BLOBS |HASH_CONTEXT);
881883
}
882884

883885
/* Create map entry. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp