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 16 Administration Cookbook

You're reading from   PostgreSQL 16 Administration Cookbook Solve real-world Database Administration challenges with 180+ practical recipes and best practices

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781835460580
Length 636 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (5):
Arrow left icon
Boriss Mejías Boriss Mejías
Author Profile Icon Boriss Mejías
Boriss Mejías
Jimmy Angelakos Jimmy Angelakos
Author Profile Icon Jimmy Angelakos
Jimmy Angelakos
Simon Riggs Simon Riggs
Author Profile Icon Simon Riggs
Simon Riggs
Gianni Ciolli Gianni Ciolli
Author Profile Icon Gianni Ciolli
Gianni Ciolli
Vibhor Kumar Vibhor Kumar
Author Profile Icon Vibhor Kumar
Vibhor Kumar
+1 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. First Steps 2. Exploring the Database FREE CHAPTER 3. Server Configuration 4. Server Control 5. Tables and Data 6. Security 7. Database Administration 8. Monitoring and Diagnosis 9. Regular Maintenance 10. Performance and Concurrency 11. Backup and Recovery 12. Replication and Upgrades 13. Other Books You May Enjoy
14. Index

How much memory does a database currently use?

This is one of those questions that are quick and simple when asked, but not so much when being answered.

PostgreSQL uses memory in a dynamic way across its databases, which is why the question includes the word “currently.” By this, we mean that the shared buffers managed by a database server are used concurrently by all its databases. This is based on demand, so if a database is unused, then the amount of memory it uses will decrease, because the same memory will gradually be reused to cache data files from busier databases.

How to do it…

The largest amount of memory is usually consumed for the shared buffers. This is an area that is shared among all the sessions; e.g., if multiple sessions are working on the same table at the same time, there is only one copy of each table block in the shared buffers.

The pg_buffercache extension provides a view that has one row for each buffer page. It can be installed...

You have been reading a chapter from
PostgreSQL 16 Administration Cookbook
Published in: Dec 2023
Publisher: Packt
ISBN-13: 9781835460580
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