Sprint 85 (Feb 2022)
It looks like a typo in "src/libs/zbxdbcache/dbsync.c" file which causes to performance degradation in PgSQL queries.
It was caused by code optimisation in commit "0e36dceb9857d2fdbca8a116b0ef1afbf6c80986"
Line 2247 now contains:
" where t.triggerid in (select distinct t.triggerid"
but nested select should refer to t.triggerid instead.
Please find attached:
- top output showing postgres processes stuck in SELECT
- active queries containing aforementioned select with possible typo which causes server performance degradation
- explain analyze outputs with typo (original query) and without it (fixed query). The difference is 232588 ms vs 38 ms.
- screenshot of the commit
ZBX-20544 Slow LLD of triggers