aqo icon indicating copy to clipboard operation
aqo copied to clipboard

AQO service storage problems

Open danolivo opened this issue 6 years ago • 1 comments

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:

  1. 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.
  2. 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 aqo before high loading.

danolivo avatar Jan 18 '19 05:01 danolivo

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;

danolivo avatar Jan 23 '20 03:01 danolivo

We have replaced table storage by file storage - the same idea as in pg_stat_statements.

danolivo avatar Oct 12 '22 10:10 danolivo