Skip to content
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

helper command for pg_top #1295

Merged
merged 3 commits into from
May 29, 2018
Merged

helper command for pg_top #1295

merged 3 commits into from
May 29, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented May 28, 2018

Description

the DB is slow sometimes (esp when loading an individual admin view of a page), so i wanted to use pg_top to debug it. this adds a helper command to install pg_top on the web repo.

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

db

Testing

na/

Refers/Fixes

self

@ghost ghost assigned owocki May 28, 2018
@ghost ghost added the in progress label May 28, 2018
@owocki owocki requested a review from mbeacom May 28, 2018 18:00
apt-get update
apt-get install pgtop -y

pg_top -p 5432 -h db -z root
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now i get a role root does not exist ... not sure how to fix this.. i also tried postgres as an arg, but that doesnt work either.

@mbeacom you may know what admin role i can use for this?

@codecov
Copy link

codecov bot commented May 28, 2018

Codecov Report

Merging #1295 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1295   +/-   ##
=======================================
  Coverage   31.29%   31.29%           
=======================================
  Files         122      122           
  Lines        8521     8521           
  Branches     1116     1116           
=======================================
  Hits         2667     2667           
  Misses       5743     5743           
  Partials      111      111

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bfbbc7...696b95d. Read the comment docs.

@ghost ghost assigned mbeacom May 28, 2018
Copy link
Contributor

@mbeacom mbeacom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified the script to use the provided local environment variables and fall back to the local docker psql settings similar to the web app. pg_activity was also added.

@mbeacom mbeacom removed the in review label May 29, 2018
@owocki
Copy link
Contributor Author

owocki commented May 29, 2018

thanks!

@owocki owocki merged commit 8ee1164 into master May 29, 2018
@ghost ghost removed the in progress label May 29, 2018
@thelostone-mc thelostone-mc deleted the pg_top branch June 15, 2018 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants