aqo
aqo copied to clipboard
AQO service storage problems
One of the main aqo problems is the storage (aqo_* relations). Extension writes query and a learn result during (sub)transaction, before and after query execution. It induce some problems:
- During service relation write access we change CommandCounter state. It can't be happened during a parallel mode (now we disable aqo in this case); Also, changing CommandCounter state during partitioning triggers execution lead to inifinity invalidation messages cycle (it can be demonstrated by alter_table.sql regression test). And some another problems.
- Parametrized plans has same hash value. It is induces aqo-related deadlocks which is not expected without aqo learning. It is meaning that on a high loads we need to use
AQO_MODE_FORCED
mode and learn aqobefore
high loading.
Currently iti is "frozen" mode can be used after learning stage. In this mode AQO don't write any data into database except of the aqo.force_collect_stat GUC set to true;
We have replaced table storage by file storage - the same idea as in pg_stat_statements.