Redshift の QMR の変更が動的に適用される(再起動不要)ことを確認した。
- QMR で Query execution time (seconds) > 10800(3時間)でクエリを実行すると中断されない。
$ psql "host=redshift-cluster-poc-ads.********.ap-northeast-1.redshift.amazonaws.com user=awsuser dbname=dev port=5439" psql (13.7, server 8.0.2) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help. dev=# select count(a.*) from public.lineorder a, public.lineorder b; ^CCancel request sent ★ Ctrl+C で中断 ERROR: Query (3782598) cancelled on user's request Time: 141901.391 ms (02:21.901)
- QMR の Query execution time (seconds) > 1(1秒)でクエリを中断するよう変更後(再起動なし)に、クエリを実行するとすぐに中断される。
dev=# select count(a.*) from public.lineorder a, public.lineorder b; ERROR: Query (3782680) cancelled by WLM abort action of Query Monitoring Rule "long_query_default_queue". DETAIL: ----------------------------------------------- error: Query (3782680) cancelled by WLM abort action of Query Monitoring Rule "long_query_default_queue". code: 1078 context: Query (3782680) cancelled by WLM abort action of Query Monitoring Rule "long_query_default_queue". query: 0 location: wlm_query_action.cpp:156 process: wlm [pid=18673] ----------------------------------------------- Time: 3026.094 ms (00:03.026)