Skip to main content

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


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.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

insidepostgresql-0.0.2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file insidepostgresql-0.0.2.tar.gz.

File metadata

  • Download URL: insidepostgresql-0.0.2.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

Hashes for insidepostgresql-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9cdb98a68a30d43620b4c7026de489a98ccaa4965fd1b53b793bd166a25a13c6
MD5 3971249fe8cde91ed014937946bee110
BLAKE2b-256 cc80c82edcaf4748ae7f6ff4bd530ee6f9840d9b49b51300e8eea0c2840afe2b

See more details on using hashes here.

File details

Details for the file insidepostgresql-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for insidepostgresql-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6dfe860ee04242dde7245f7fd98d489d2654acbec7e805e5224c034dd48ff08e
MD5 a7b46c1a12d32b7c8545759fccb8f7db
BLAKE2b-256 851fbaec6b2409128f484f5331ee269b52d8a8fa09cb0a73475e8722f71aa80e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page