How to check blocked queries

Lately I had to several cases with the same reason – hanging selects blocking changes in data. All cases on PostgreSQL 11. It almost looks like PG 11 does not recognize that client connection ended and is not listening anymore – all hanging processes had...

Debug / trace PostgreSQL with perf

Read this text Tracing PostgreSQL with perf. Or this perf CPU sampling. This text contains short summary. Install perf: sudo apt-get install linux-tools-3.16 (or other version – depends on your OS) Install postgresql server debug symbols: sudo apt-get install...