Check and analyze a PostgreSQL cluster.
Project description
InsidePostgreSQL Package
This Python package provides functionality to interact with a PostgreSQL database and perform various checks and calculations. It includes the following features:
- Connection to a PostgreSQL database
- Checking for inactive replication slots
- Checking for long-running queries
- Counting active sessions
- Calculating table bloat ratio
- Checking the last analyze and autovacuum dates for tables
Getting Started
pip3 install insidepostgresql
db = PostgreSQL("172.17.0.2", "demo", "test123", "test")
Connected to PostgreSQL successfully.
+------------------------------------------+---------+
| Metric | Value |
+==========================================+=========+
| Long Running Query | ✓ |
+------------------------------------------+---------+
| Sum of Active Sessions < 50 | ✓ |
+------------------------------------------+---------+
| Last Analyze/Autovacuum in the Last Week | ✓ |
+------------------------------------------+---------+
| No Bloat Table Exists | ✓ |
+------------------------------------------+---------+
| No Inactive Replication Slot | ✓ |
+------------------------------------------+---------+
Contributing
If you would like to contribute to insidepostgresql, please submit a pull request with your changes. Before submitting a pull request, please make sure that your changes are properly tested and documented.
License
InsideCouchbase is licensed under the MIT license. See the LICENSE file for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
insidepostgresql-0.0.1.tar.gz
(16.0 kB
view details)
Built Distribution
File details
Details for the file insidepostgresql-0.0.1.tar.gz
.
File metadata
- Download URL: insidepostgresql-0.0.1.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 228bca605c215236e9485d3fdde99b7419c59c997eefe97fe76e8c3e85846838 |
|
MD5 | a6597f23429f0c417639e7bc1858ee79 |
|
BLAKE2b-256 | 672ff8b249d21874dd26a05c41377b0245f1f05578a95228a9b72f74bee608cf |
File details
Details for the file insidepostgresql-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: insidepostgresql-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56dc0489c37e942084a3f16fa1e6405d31072d6695d3f86598f423c8b888619a |
|
MD5 | 8df5c16d1bea76f56adee6774442582c |
|
BLAKE2b-256 | 38bec18f113231e97a0507927b8452778e91dd75227d5b6a3a353d39a10d5ff1 |