Book Image

PostgreSQL for Data Architects

By : Jayadevan M
Book Image

PostgreSQL for Data Architects

By: Jayadevan M

Overview of this book

Table of Contents (19 chapters)
PostgreSQL for Data Architects
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Server-wide memory settings


We will look at two parameters related to buffers, the first parameter is an allocation and the second parameter is a pointer to the optimizer. Both have a significant impact on performance.

shared_buffers

This parameter decides how much memory will be dedicated to PostgreSQL to cache data. When multiple sessions request the same data from the same table, shared_buffers ensure that there is no need to have many copies of the datasets in memory. This approach reduces the necessary physical I/O. The buffers are allocated at database startup. The default value set by initdb in newer versions of PostgreSQL (9.3 and higher) is 128 MB. It was 32 MB in older versions. This parameter has a significant impact on the performance because this setting directly affects the amount of physical I/O on the server.

In versions earlier than 9.3, kernel settings adjustment (shmmax) would be necessary to set a value higher than 32 MB for shared_buffers.

Considering that even desktops...