Skip to Main Content
PostgreSQL 10 High Performance - Third Edition
book

PostgreSQL 10 High Performance - Third Edition

by Enrico Pirozzi
April 2018
Intermediate to advanced content levelIntermediate to advanced
508 pages
15h 22m
English
Packt Publishing
Content preview from PostgreSQL 10 High Performance - Third Edition

Database disk layout

In order to fully interpret the information returned by utilities such as pg_buffer_cache, and therefore use that information to adjust memory sizing, it's helpful to know a bit about how databases are stored on disk. On Unix-like systems, typically, the $PGDATA environment variable on your system will point to your database cluster and, underneath the base/ directory, actually contains the database tables.

If you're not sure where your database is located on disk, but if you can connect to the database, the location of this and other important files on the server is available from the pg_settings view. This particular detail is in the data_directory setting; here's an example of locating it, and a query showing the locations ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PostgreSQL: Up and Running, 3rd Edition

PostgreSQL: Up and Running, 3rd Edition

Regina O. Obe, Leo S. Hsu
Learn PostgreSQL - Second Edition

Learn PostgreSQL - Second Edition

Luca Ferrari, Enrico Pirozzi
PostgreSQL, Second Edition

PostgreSQL, Second Edition

Korry Douglas, Susan Douglas

Publisher Resources

ISBN: 9781788474481Supplemental Content