在使用 pg_activity 推测瓶颈之前,先检查实时的 PostgreSQL 等待、锁和压力情况
Open a live PostgreSQL activity view during incidents so you can see sessions, waits, locks, and pressure before making a bad call.
Prerequisites
PostgreSQL connection access, pg_activity installation, terminal access to the target environment
Installation
Use the upstream install or setup path that matches your environment:
- $ pipx install "pg_activity[psycopg]"
- $ git clone https://github.com/1991513ccie-png/skills
- $ git clone https://github.com/1991513ccie-png/skills
Requirements and caveats from upstream:
- pg_activity can be installed using pip on Python 3.8 or later along with
- pg_activity must be the same user running postgresql server (postgres by
Basic usage or getting-started notes:
From distribution packages
The simplest way to install pg_activity is through the package manager of your
Linux distribution, if it ships with a package. E.g., on Debian-based
Source: https://github.com/1991513ccie-png/skills
Extracted from upstream docs: https://raw.githubusercontent.com/dalibo/pg_activity/HEAD/README.md
Documentation
- https://github.com/1991513ccie-png/skills



