3 ms·
Yeah that’s a super handy resource for all sorts of stuff, if you dump a view of pids by age and also a separate view of pg_locks joined to pg_stat_activity to
by CraigJPerry 4y ago
Yeah that’s a super handy resource for all sorts of stuff, if you dump a view of pids by age and also a separate view of pg_locks joined to pg_stat_activity to show blockers and their blocked pids, and i’ve always dumped disk and cpu markers too, then journal that every few seconds to disk, it’s super handy for tailing it in a web dashboard view as you said - which also has a convenient side benefit of stopping every man and their granny having duplicate squizzes at the pg_* tables if there’s been a suspected wobble of some sort.
But it’s also really great for providing a cheap historical snapshot of activity for historical investigations and course grained analysis.
There are potential dangers with going overboard in this like inadvertently asserting troublesome locks or leaking sensitive data, but fairly easy to avoid.