feat: exclude long-running physical backup queries from pg:ps results#3675
Closed
feat: exclude long-running physical backup queries from pg:ps results#3675
Conversation
Open
13 tasks
Contributor
Author
|
Closing - we'll want to stick to heroku/heroku-pg-extras#285. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Heroku Postgres runs physical backups as part of continuous protection. These can take some time and the underlying
pg_start_backup(on PG15+) queries will appear as long running, idle in transaction processes.These are unnecessary noise and can confuse users over processes they have no control over. The backup process queries will of course be still visible through
pg_stat_activity, but we should remove it from our troubleshooting commands to reduce confusion - it is expected for these long transactions to exist on the database during base backups.See: https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-BACKUP and https://www.postgresql.org/docs/current/continuous-archiving.html.
Related: heroku/heroku-pg-extras#285
Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
Notes:
This is a minor change and its impact is only visible, in normal conditions, when running the command against a database with a long running command. It is therefore not immediately testable by non-data operators that can't start a backup on the database that this change aims to exclude from the results.
Steps:
but:
pg:ps. The result should not include the internal superuser (postgres) connection waiting idle in transaction for pg_backup_start.Screenshots (if applicable)
Current
main- the "idle in transaction" process is listed:Running the command on my branch after that - the process is no longer listed, as expected:
Back to
mainfor sanity check, the previously filtered process reappears:Related Issues
GUS work item: W-22101694