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

Commitd93bb81

Browse files
committed
Fix outdated CHUNKHDRSZ value in nodeAgg.c
CHUNKHDRSZ was defined as 16 bytes, which was true when that code went in,but sincec6e0fe1, 8 is a more accurate value. Here we adjust it to usesizeof(MemoryChunk), which is normally 8, or 16 for cassert builds.c6e0fe1 first appeared in v16, so this is technically wrong in v16 upto master, but let's apply this only to master as adjusting this doesinfluence the estimated number of batches in the aggregate costing codeand we don't want to cause plan instability in released versions.Reviewed-by: Tom LaneDiscussion:https://postgr.es/m/CAApHDvpMpRQvsTqZo3FinXkgytwxwF8sCyZm83xDj-1s_hLe+w@mail.gmail.com
1 parent11012c5 commitd93bb81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/executor/nodeAgg.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@
272272
#include"utils/logtape.h"
273273
#include"utils/lsyscache.h"
274274
#include"utils/memutils.h"
275+
#include"utils/memutils_memorychunk.h"
275276
#include"utils/syscache.h"
276277
#include"utils/tuplesort.h"
277278

@@ -314,10 +315,9 @@
314315
#defineHASHAGG_HLL_BIT_WIDTH 5
315316

316317
/*
317-
* Estimate chunk overhead as a constant 16 bytes. XXX: should this be
318-
* improved?
318+
* Assume the palloc overhead always uses sizeof(MemoryChunk) bytes.
319319
*/
320-
#defineCHUNKHDRSZ16
320+
#defineCHUNKHDRSZsizeof(MemoryChunk)
321321

322322
/*
323323
* Represents partitioned spill data for a single hashtable. Contains the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp