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

Commita81afb6

Browse files
Andrey Kazarinovdanolivo
Andrey Kazarinov
authored andcommitted
set max size 1000
1 parentaf3a91e commita81afb6

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
@@ -253,6 +253,19 @@ _PG_init(void)
253253
NULL
254254
);
255255

256+
DefineCustomIntVariable("aqo.max_size",
257+
"Query max size in aqo_query_texts.",
258+
NULL,
259+
&max_size,
260+
1000,
261+
0,INT_MAX,
262+
PGC_SUSET,
263+
0,
264+
NULL,
265+
NULL,
266+
NULL
267+
);
268+
256269
prev_shmem_startup_hook=shmem_startup_hook;
257270
shmem_startup_hook=aqo_init_shmem;
258271
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