@@ -175,7 +175,8 @@ typedef enum
175
175
extern int aqo_mode ;
176
176
extern bool force_collect_stat ;
177
177
extern bool aqo_show_hash ;
178
- extern bool aqo_details ;
178
+ extern bool aqo_show_details ;
179
+ extern int aqo_query_text_limit ;
179
180
180
181
/*
181
182
* It is mostly needed for auto tuning of query. with auto tuning mode aqo
@@ -267,7 +268,7 @@ extern get_parameterized_joinrel_size_hook_type
267
268
prev_get_parameterized_joinrel_size_hook ;
268
269
extern copy_generic_path_info_hook_type
269
270
prev_copy_generic_path_info_hook ;
270
- extern ExplainOnePlan_hook_type prev_ExplainOnePlan_hook ;
271
+ extern ExplainOnePlan_hook_type prev_ExplainOnePlan_hook ;
271
272
272
273
extern void ppi_hook (ParamPathInfo * ppi );
273
274
@@ -282,20 +283,19 @@ int get_clause_hash(Expr *clause, int nargs,
282
283
283
284
284
285
/* Storage interaction */
285
- bool find_query (int query_hash ,
286
- Datum * search_values ,
287
- bool * search_nulls );
288
- bool add_query (int query_hash , bool learn_aqo , bool use_aqo ,
289
- int fspace_hash , bool auto_tuning );
290
- bool update_query (int query_hash , bool learn_aqo , bool use_aqo ,
291
- int fspace_hash , bool auto_tuning );
292
- bool add_query_text (int query_hash , const char * query_text );
293
- bool load_fss (int fss_hash , int ncols ,
294
- double * * matrix , double * targets , int * rows );
295
- extern bool update_fss (int fss_hash , int nrows , int ncols ,
286
+ extern bool find_query (int qhash , Datum * search_values , bool * search_nulls );
287
+ extern bool update_query (int qhash , int fhash ,
288
+ bool learn_aqo , bool use_aqo , bool auto_tuning );
289
+ extern bool add_query_text (int query_hash , char * query_text );
290
+ extern bool load_fss (int fhash , int fss_hash ,
291
+ int ncols , double * * matrix , double * targets , int * rows );
292
+ extern bool update_fss (int fhash , int fss_hash , int nrows , int ncols ,
296
293
double * * matrix , double * targets );
297
294
QueryStat * get_aqo_stat (int query_hash );
298
295
void update_aqo_stat (int query_hash , QueryStat * stat );
296
+ extern bool my_index_insert (Relation indexRelation , Datum * values , bool * isnull ,
297
+ ItemPointer heap_t_ctid , Relation heapRelation ,
298
+ IndexUniqueCheck checkUnique );
299
299
void init_deactivated_queries_storage (void );
300
300
void fini_deactivated_queries_storage (void );
301
301
bool query_is_deactivated (int query_hash );
@@ -382,4 +382,7 @@ void cache_selectivity(int clause_hash,
382
382
double * selectivity_cache_find_global_relid (int clause_hash , int global_relid );
383
383
void selectivity_cache_clear (void );
384
384
385
+ extern Oid get_aqo_schema (void );
386
+ extern void init_lock_tag (LOCKTAG * tag , uint32 key1 , uint32 key2 );
387
+
385
388
#endif
0 commit comments