Skip to content

Commit e39c822

Browse files
Adjust README.md
1 parent c4c4340 commit e39c822

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,21 @@ Called once per your Postgres cluster.
217217
per each slave. If the slave and the master are in synchronous state,
218218
the replication delay is zero.
219219

220-
221-
### Database Local Directory Based (Global) Metrics
222-
223220
* **get_stats_wal_file_amount**:
224221
This graph shows the amount of files in your database clusters WAL log
225222
directory (pg_wal or pg_xlog). If the WAL file amount starts to suddenly
226223
increase, you probably have issues with your WAL archiving process, which
227224
might lead to the disk filling up, and you database cluster crashing.
225+
226+
* **get_xid_remaining_ratio, get_multixact_remaining_ratio, get_multixact_members_remaining_ratio**:
227+
These metric shows the corresponding remaining % of transaction ids ("xid"), multixact ids ("mxid"),
228+
and multixact members that are available for postgres to use before exhaustion.
229+
Useful for ensuring that the vacuuming is working as intended for your postgres instance.
230+
231+
* **get_multixact_members_per_mxid**:
232+
This metric emits the number of multixact members there are per multixact ID. A larger number means
233+
that it'll be quicker for the multixact members exhaustion to happen (as can
234+
be seen in **get_multixact_members_usage_ratio**).
228235

229236

230237
## Short Overview of Python Modules

etc/postgresql-metrics/default/postgresql-metrics.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ global_db_functions:
5858
- ["get_stats_heap_hit_statistics", 60]
5959
- ["get_stats_replication_delays", 60]
6060
- ["get_stats_wal_file_amount", 180]
61-
- ["get_multixact_members_usage_ratio", 60]
6261
- ["get_multixact_members_per_mxid", 60]
62+
- ["get_multixact_members_remaining_ratio", 60]
6363
- ["get_multixact_remaining_ratio", 60]
6464
- ["get_xid_remaining_ratio", 60]

postgresql_metrics/metrics_gatherer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def get_multixact_members_per_mxid(data_dir, db_connection):
172172
return [metric_multixact_members_per_mxid(members_per_id)]
173173

174174

175-
def get_multixact_members_usage_ratio(data_dir, _db_connection):
175+
def get_multixact_members_remaining_ratio(data_dir, _db_connection):
176176
members = _get_multixact_members(data_dir)
177177
ratio = round(members / MAX_MULTIXACT_MEMBERS, 2)
178178
percentage_remaining = (1.0 - ratio) * 100

0 commit comments

Comments
 (0)