-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add postgresql query progress api #2797
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Monitoring and Auditing Your Scalingo for PostgreSQL® Addon | ||
nav: Monitoring and Auditing | ||
modified_at: 2024-03-26 12:00:00 | ||
modified_at: 2024-09-20 10:35:00 | ||
tags: databases postgresql addon | ||
index: 7 | ||
--- | ||
|
@@ -89,6 +89,12 @@ stuck ones. | |
Viewing running queries is only available from the database dashboard. | ||
{% endnote %} | ||
|
||
### Using an sql client | ||
|
||
Running queries will appear in [pg_stat_activity](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW) view, filtering on `state = 'active'. | ||
|
||
You can monitor `CREATE INDEX` and `REBUILD INDEX` progress in [pg_stat_progress_create_index] (https://www.postgresql.org/docs/current/progress-reporting.html#CREATE-INDEX-PROGRESS-REPORTING). | ||
|
||
|
||
## Exploring Query Statistics | ||
|
||
|
@@ -137,3 +143,10 @@ to be activated manually. | |
{% note %} | ||
Consulting query statistics is only available from the database dashboard. | ||
{% endnote %} | ||
|
||
## Maintenance operations | ||
|
||
Scheduled VACUUMs are run automatically and can affect database performance. | ||
While executing, they will appear in [pg_stat_activity](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW) view, not appear in [pg_stat_progress_vacuum](https://www.postgresql.org/docs/current/progress-reporting.html#VACUUM-PROGRESS-REPORTING) view. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the actual behaviour in 2023, but may have changed since then. |
||
|
||
You can log them using [log_autovacuum_min_duration](https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-AUTOVACUUM-MIN-DURATION) parameter, and check the last time a table has been VACUUMed in [pg_stat_user_tables.last_autovacuum](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW) view. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember how I changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this page include only Scalingo features (not PG ones), I suggest to move this to
Troubleshooting
https://doc.scalingo.com/databases/postgresql/troubleshooting