Time-consuming queries to PostgreSQL Database are duplicated

Viewed 166

After restoring db-server from snapshot something strange started happening with our database. Basically it can be described as all time-consuming queries are seems to be duplicated. At least as pg_stat_activity shows it

select from pg_stat_activity with only active queries shown

These lines are almost equal except for their PIDs and client addresses.

Usually I'd think that that's just a mistake of dev team (multiple equal queries at a time in code, cron misconfiguration, etc), but one of those time-consuming selects comes from PowerBI which I believe to be quite reliable in terms of loading data.

Has anybody ever stumbled upon this problem?

1 Answers

Turned out that's the way pg_stat_activity shows parallel workers processing single query. You can make sure that's the case by getting backend_type of these records.

Related