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

Commit4d3a687

Browse files
Andrey KazarinovAlena Rybakina
Andrey Kazarinov
authored and
Alena Rybakina
committed
set max size 1000
1 parent7a03aa5 commit4d3a687

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

‎aqo.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,19 @@ _PG_init(void)
238238
NULL
239239
);
240240

241+
DefineCustomIntVariable("aqo.max_size",
242+
"Query max size in aqo_query_texts.",
243+
NULL,
244+
&max_size,
245+
1000,
246+
0,INT_MAX,
247+
PGC_SUSET,
248+
0,
249+
NULL,
250+
NULL,
251+
NULL
252+
);
253+
241254
prev_shmem_startup_hook=shmem_startup_hook;
242255
shmem_startup_hook=aqo_init_shmem;
243256
prev_planner_hook=planner_hook;

‎aqo_shared.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ HTAB *fss_htab = NULL;
2828
staticintaqo_htab_max_items=1000;
2929
intfs_max_items=1;/* Max number of different feature spaces in ML model */
3030
intfss_max_items=1;/* Max number of different feature subspaces in ML model */
31+
intmax_size=1000;
3132
staticuint32temp_storage_size=1024*1024*10;/* Storage size, in bytes */
3233
staticdsm_segment*seg=NULL;
3334

‎aqo_shared.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ extern HTAB *fss_htab;
5252

5353
externintfs_max_items;/* Max number of feature spaces that AQO can operate */
5454
externintfss_max_items;
55+
externintmax_size;
5556

5657
externSizeaqo_memsize(void);
5758
externvoidreset_dsm_cache(void);

‎storage.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,7 @@ aqo_qtext_store(uint64 queryid, const char *query_string)
969969
}
970970

971971
entry->queryid=queryid;
972+
size=size>max_size ?max_size :size;
972973
entry->qtext_dp=dsa_allocate(qtext_dsa,size);
973974
Assert(DsaPointerIsValid(entry->qtext_dp));
974975
strptr= (char*)dsa_get_address(qtext_dsa,entry->qtext_dp);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp