Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5437c07

Browse files
committed
Bugfix. Switch off quickly all AQO features if queryId is disabled.
One installcheck test was added into the github actions workflow. Reviewed by: @Anisimov-ds
1 parent d91095f commit 5437c07

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/installchecks.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,24 @@ jobs:
132132
psql -c "ALTER SYSTEM SET aqo.mode = 'learn'"
133133
psql -c "ALTER SYSTEM SET aqo.force_collect_stat = 'on'"
134134
psql -c "SELECT pg_reload_conf()"
135-
learn_result=$(make -k installcheck-world)
135+
make -k installcheck-world
136+
137+
# Should work like a total off for all the AQO features
138+
- name: installcheck_learn_queryid_off
139+
continue-on-error: true
140+
run: |
141+
cd $PG_DIR
142+
aqo_instance_launch.sh
143+
psql -c "ALTER SYSTEM SET compute_query_id = 'off'"
144+
psql -c "SELECT pg_reload_conf()"
145+
# The AQO tests itself wouldn't pass
146+
make -k installcheck-world
136147
137148
- name: installcheck_intelligent
138149
continue-on-error: true
139150
run: |
140151
cd $PG_DIR
152+
psql -c "ALTER SYSTEM SET compute_query_id = 'regress'"
141153
psql -c "ALTER SYSTEM SET aqo.mode = 'intelligent'"
142154
psql -c "ALTER SYSTEM SET aqo.force_collect_stat = 'on'"
143155
psql -c "SELECT pg_reload_conf()"

preprocessing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static bool isQueryUsingSystemRelation_walker(Node *node, void *context);
8383
static bool
8484
aqoIsEnabled(Query *parse)
8585
{
86-
if (creating_extension ||
86+
if (creating_extension || !IsQueryIdEnabled() ||
8787
(aqo_mode == AQO_MODE_DISABLED && !force_collect_stat) ||
8888
(parse->commandType != CMD_SELECT && parse->commandType != CMD_INSERT &&
8989
parse->commandType != CMD_UPDATE && parse->commandType != CMD_DELETE))

0 commit comments

Comments
 (0)