Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PostgreSQL Administration Essentials

You're reading from   PostgreSQL Administration Essentials Discover efficient ways to administer, monitor, replicate, and handle your PostgreSQL databases

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher Packt
ISBN-13 9781783988983
Length 142 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Understanding the system statistics of PostgreSQL

There are several system tables and system views to check out PostgreSQL statistics. In this chapter, the most important system views will be covered and discussed. Unfortunately, there is not enough room to cover all those views in detail. However, the most important ones are here.

Tip

More information about those system tables can be found at http://www.postgresql.org/docs/9.4/static/monitoring-stats.html.

Checking out the pg_stat_activity file

The pg_stat_activity file is usually the first thing a system administrator will check out in case something seems to go south. The idea behind pg_stat_activity is to provide the administrator with an overview of all currently open connections on the server. So, you will get one line per database connection. Here is an example of my pg_stat_activity view:

test=# \x
Expanded display (expanded) is on.
test=# SELECT * FROM pg_stat_activity;
-[ RECORD 1 ]----+--------------------------------
 datid    ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime