Tag: memory
DECLARE CURSOR in PostgreSQL or how to reduce memory consumption
Have you ever heard about cursors in PostgreSQL or in SQL in general? If not you should definitely read this article in depth and learn how to reduce memory consumption in PostgreSQL easily. Cursors have been around for many years and are in my judgement one of the most underappreciated feature of all times. Therefore, […]
DROP TABLE: Killing shared_buffers
UPDATED August 2023: Tuning shared_buffers in PostgreSQL is a pretty fundamental thing to do when you set up a high-performance server. In most cases, you add more memory to speed things up considerably. Many tests have shown exactly that. However, there are some corner cases which are not common, and which can cause significant performance […]
Checking per-memory context memory consumption
Writing a complex database server like PostgreSQL is not an easy task. Especially memory management is an important task, which needs special attention. Internally PostgreSQL makes use of so called “memory contexts”. The idea of a memory context is to organize memory in groups, which are organized hierarchically. The main advantage is that in case […]
Memory: Once in a lifetime
Since I started with PostgreSQL almost 15 years back, I’ve adjusted shared memory settings literally hundreds of times. Changing kernel parameters has always been a central task for all users. The reason for this was mostly that many UNIX systems restricted the use of shared memory by default (Linux, Solaris, etc.). People who were new […]