pawurb / ruby-pg-extras

Ruby PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.
MIT License
124 stars 11 forks source link

pg_buffercache inspection #1

Closed rainerborene closed 3 years ago

rainerborene commented 3 years ago

pg_buffercache is one of those built-in extensions that provides lots of good feedback. It provides a means for examining what's happening in the shared buffer cache in real time. I'm working on a few Rails tasks and I thought it would be a great idea to provide them here instead. Would you merge it if I come up with a pull request?

pawurb commented 3 years ago

Hi. Sure, this project is open to contributions. But would you mind sharing a sample result from the query you'd like to implement?

rainerborene commented 3 years ago

I guess I should link and credit the authors.

https://www.dbrnd.com/2018/04/postgresql-script-to-check-the-status-of-shared-buffer-use-pg_buffercache/

Consider only queries number 1, 2 and 4:

https://sites.google.com/site/itmyshare/database-tips-and-examples/postgres/useful-sqls-to-check-contents-of-postgresql-shared_buffer

Let me know what you think.

pawurb commented 3 years ago

Ok. I've never used it but it will be a chance to get to know it. Once we merge it I'll add a separate Sources section to the readme listing all query sources.