Search icon CANCEL
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 High Performance Cookbook

You're reading from   PostgreSQL High Performance Cookbook Mastering query optimization, database monitoring, and performance-tuning for PostgreSQL

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781785284335
Length 360 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Chitij Chauhan Chitij Chauhan
Author Profile Icon Chitij Chauhan
Chitij Chauhan
Dinesh Kumar Dinesh Kumar
Author Profile Icon Dinesh Kumar
Dinesh Kumar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Database Benchmarking FREE CHAPTER 2. Server Configuration and Control 3. Device Optimization 4. Monitoring Server Performance 5. Connection Pooling and Database Partitioning 6. High Availability and Replication 7. Working with Third-Party Replication Management Utilities 8. Database Monitoring and Performance 9. Vacuum Internals 10. Data Migration from Other Databases to PostgreSQL and Upgrading the PostgreSQL Cluster 11. Query Optimization 12. Database Indexing

Managing PgBouncer


PgBouncer provides an administrative console to view pool status and client connections. In this recipe we are going to see information regarding PgBouncer connections, client connections, view pool status, and obtaining connection pooling statistics.

Getting ready

Before we issue any commands we first need to connect to the PgBouncer's administrative console. For this purpose we need to set the admin_users parameter in the pgbouncer.ini configuration file:

vi /etc/pgbouncer/pgbouncer.ini 
 
admin_users = author 

Once the preceding changes are saved in the pgbouncer.ini configuration file the PgBouncer service needs to be restarted in order to ensure that the parameter changes come into effect:

service pgbouncer restart

Once this is done we can then make connections to the PgBouncer administration console with the following command:

 psql -p 6432 -U author pgbouncer 

How to do it...

With the help of the PgBouncer administration console we can get information...

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 €18.99/month. Cancel anytime