powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
766 stars 57 forks source link

Postgres freeze when using long lists in the where clause #82

Closed tsn77130 closed 7 years ago

tsn77130 commented 7 years ago

I juste have problem where long lists in where clause ( >= 500) makes postgresql instance freeze.

Ex : update accounts_v1 set active = true where (account_id, field_id) in ( (6262,5),(6622,22),(2254,7),(2698,70),(2310,4),(6135,22),... )

If I use 499 entries it works, with 500 it freeze the instance, and no other requests works no more

See with postgresql 9.5.3

If I don't use shared_preload_libraries='pg_stat_statements,powa,pg_stat_kcache,pg_qualstats' ; it works.

rjuju commented 7 years ago

Hello,

Thanks for the report! This issue was similar to this one: https://github.com/dalibo/pg_qualstats/issues/6

Thanks to your feedback, I could reproduce this issue, and commit https://github.com/dalibo/pg_qualstats/commit/82d0b086b91d5bdfffc6945ac5942f439393e095 should fix it.