Skip to content

Commit

Permalink
fix: set new pg_locks metrics names
Browse files Browse the repository at this point in the history
  • Loading branch information
cuprumtan committed Jan 11, 2024
1 parent c5bbf3f commit cf0205e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions documentation/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3250,7 +3250,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, REFRESH MATERIALIZED VIEW, LOCK TABLE and some forms of ALTER INDEX and ALTER TABLE</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3283,7 +3283,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: Read Only Queries</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by queries that only reads tables and do not modify</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3316,7 +3316,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: Locks From Application or Some Operations on System Catalogs</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like REFRESH MATERIALIZED VIEW CONCURRENTLY</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3349,7 +3349,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: Write Queries</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like UPDATE, DELETE, INSERT and MERGE</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3382,7 +3382,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: SELECT FOR SHARE and SELECT FOR UPDATE</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like SELECT FOR SHARE and SELECT FOR UPDATE</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3415,7 +3415,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: Locks From Application</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like CREATE TRIGGER and some forms of ALTER TABLE</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3448,7 +3448,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY, CREATE STATISTICS, COMMENT ON, REINDEX CONCURRENTLY, and some forms of ALTER INDEX and ALTER TABLE</td>
</tr>
<tr>
<th>Key</th>
Expand Down Expand Up @@ -3481,7 +3481,7 @@ Default config:
<table>
<tr>
<th>Name</th>
<td>PostgreSQL Locks: CREATE INDEX</td>
<td>PostgreSQL Locks: total number of locks acquired (or waiting) by all queries like CREATE INDEX</td>
</tr>
<tr>
<th>Key</th>
Expand Down
16 changes: 8 additions & 8 deletions mamonsu/plugins/pgsql/pg_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@ class PgLocks(Plugin):
Items = [
# key, desc, color
("accessshare",
"Read Only Queries",
"total number of locks acquired (or waiting) by queries that only reads tables and do not modify",
"00CC00"),
("rowshare",
"SELECT FOR SHARE and SELECT FOR UPDATE",
"total number of locks acquired (or waiting) by all queries like SELECT FOR SHARE and SELECT FOR UPDATE",
"3B415A"),
("rowexclusive",
"Write Queries",
"total number of locks acquired (or waiting) by all queries like UPDATE, DELETE, INSERT and MERGE",
"FF5656"),
("shareupdateexclusive",
"VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY",
"total number of locks acquired (or waiting) by all queries like VACUUM, ANALYZE, CREATE INDEX CONCURRENTLY, CREATE STATISTICS, COMMENT ON, REINDEX CONCURRENTLY, and some forms of ALTER INDEX and ALTER TABLE",
"F6CB93"),
("share",
"CREATE INDEX",
"total number of locks acquired (or waiting) by all queries like CREATE INDEX",
"006AAE"),
("sharerowexclusive",
"Locks from Application",
"total number of locks acquired (or waiting) by all queries like CREATE TRIGGER and some forms of ALTER TABLE",
"00B0B8"),
("exclusive",
"Locks from Application or Some Operations on System Catalogs",
"total number of locks acquired (or waiting) by all queries like REFRESH MATERIALIZED VIEW CONCURRENTLY",
"9C8A4E"),
("accessexclusive",
"ALTER TABLE, DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, LOCK TABLE",
"total number of locks acquired (or waiting) by all queries like DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, REFRESH MATERIALIZED VIEW, LOCK TABLE and some forms of ALTER INDEX and ALTER TABLE",
"793F5D")
]

Expand Down

0 comments on commit cf0205e

Please sign in to comment.