Advertisement · 728 × 90
#
Hashtag
#postgreSQL
Advertisement · 728 × 90
Preview
PgDay Boston 2026 Sponsors We are proud to be associated with these fine sponsors, without whom PgDay Boston 2026 would not be possible!

We have sponsorship opportunities available! If you need help choosing which one is right for your company, please contact us! We’re happy to help!

2026.pgdayboston.org/sponsors/

#PostgreSQL #postgres #conference

0 0 0 0
Preview
Monitoring memory consumption is a fundamental task for any PostgreSQL administrator. Unlike simple applications, PostgreSQL uses a sophisticated **memory architecture** that splits resources between a large shared pool and smaller, session-local areas for specific tasks like sorting and joining. Understanding how these segments are utilized is the key to preventing “Out of Memory” (OOM) errors and optimizing overall database performance. This guide explores practical methods to verify how much memory your PostgreSQL database is currently using and breaks down the relative weight of each component. Whether you are auditing server-wide **shared buffers** or investigating the memory footprint of a single complex query, these built-in tools and terminal commands provide the accurate data you need to maintain a healthy system. * * * Table of Contents Toggle * Key Takeaways for Memory Monitoring * Method 1: Querying Global Statistics with SQL Commands * Method 2: Logging Granular Backend Memory Contexts * Method 3: OS-Level Analysis with ps and top * Step-by-Step Process to Audit Memory Usage * Memory Component Summary and Weights * FAQs * Related Posts #### **Key Takeaways for Memory Monitoring** * **Shared Buffers** → The largest fixed memory segment, used for **caching data blocks** from disk to improve read/write speed. * **Work Memory** → Memory allocated per query operation for **sorting and hashing** ; it is the most volatile part of the memory footprint. * **Maintenance Work Memory** → Resources specifically reserved for large maintenance tasks like **VACUUM and CREATE INDEX**. * **OS Page Cache** → PostgreSQL relies heavily on the **operating system’s cache** to hold data that doesn’t fit in its internal shared buffers. * **Resident Set Size (RSS)** → The actual physical memory used by a process as reported by the OS, though it can be misleading due to **shared memory mapping**. * * * #### **Method 1: Querying Global Statistics with SQL Commands** The most effective way to see your primary memory allocations is to query the system’s preset configuration values. This reveals the “logical” limits the server has set for its different memory areas. **How to Apply the Fix:** Run the following query in your psql terminal to see the size of the main shared memory area: `SELECT * FROM pg_settings WHERE name = 'shared_memory_size';` **Expected Output:** This returns a value representing the **total shared pool** , rounded to the nearest megabyte. You can also use `SHOW shared_buffers;` to see your primary data cache size. For a deeper look at these variables, see **Essential PostgreSQL configuration parameters for better performance**. #### **Method 2: Logging Granular Backend Memory Contexts** If a specific session is consuming too much memory, you can force PostgreSQL to dump its internal **memory contexts** into the server log. This is essential for debugging memory leaks in complex queries. **Command Example:** First, identify the **PID** of the target process from `pg_stat_activity`. Then, execute: `SELECT pg_log_backend_memory_contexts(target_pid);` **Understanding the Result:** PostgreSQL will log a detailed report for that PID, showing “Total bytes” and “Used bytes” for structures like `TopMemoryContext` and `MessageContext`. This helps determine if memory is being held by specific query operations or general session overhead. #### **Method 3: OS-Level Analysis with ps and top** Since each connection is its own process, you can use standard Unix tools to monitor real-time consumption at the operating system level. **Command Syntax:** `ps auxww | grep ^postgres` See also: Mastering the Linux Command Line — Your Complete Free Training Guide **Understanding the Output:** The **RSS column** shows the physical RAM used. However, note that for most PostgreSQL processes, this value includes the entire **shared_buffers** pool, which is mapped into every process but only exists once in physical RAM. To learn more about identifying these processes, refer to **Finding your tables in PostgreSQL**. * * * #### **Step-by-Step Process to Audit Memory Usage** 1. **Check Primary Buffers** : Use `SHOW shared_buffers;` to verify your main cache size (typically 25% of system RAM). 2. **Verify Active Sessions** : Run `SELECT count(*) FROM pg_stat_activity;` to see how many potential `work_mem` chunks are active. 3. **Identify High-Resource PIDs** : Use the OS command `top` or `htop` to sort processes by memory usage. 4. **Inspect Query Performance** : Run **`EXPLAIN ANALYZE`** on slow queries to see if they are spilling to disk or using excessive `work_mem`. 5. **Audit the Server Log** : Look for “Out of Memory” messages to see if the **OOM Killer** has been active on your Linux instance. * * * #### **Memory Component Summary and Weights** Memory Area| Checking Command| Typical Weight| Purpose ---|---|---|--- **Shared Buffers**| `SHOW shared_buffers;`| **25% – 40%** of RAM| Caching data blocks for read/write. **Work Memory**| `SHOW work_mem;`| **Dynamic** (Per Ops)| Memory for **sorting and hashing**. **Maintenance**| `SHOW maintenance_work_mem;`| **~5% – 10%** of RAM| Used for **VACUUM and Indexes**. **WAL Buffers**| `SHOW wal_buffers;`| **~3%** of Shared Buffers| Buffering Write-Ahead Logs. **OS Cache**| OS tools (`free -m`)| **The Remainder**| Kernel-level file system caching. * * * #### **FAQs** **Why does every postgres process show the same high memory usage in`top`?** This is due to **shared memory**. Most of the reported memory is actually the `shared_buffers` pool, which is shared across all processes. They are not actually consuming that much RAM individually. **How can I prevent the Linux OOM Killer from stopping my DB?** You can set the **OOM score adjustment** for the postmaster process to -1000, ensuring the kernel targets other processes first when memory is low. **Can I increase memory for a single task?** Yes. You can run `SET work_mem = '128MB';` within a single session to give a specific heavy report more memory without changing the global server settings. * * * #### **Related Posts** * **Understanding PostgreSQL’s Memory Architecture** * **Essential PostgreSQL Configuration Parameters for Better Performance** * **Troubleshooting Slow Queries in PostgreSQL: A Step-by-Step Guide** * **How EXPLAIN and EXPLAIN ANALYZE Improve Performance**

3 ways to Check PostgreSQL Memory Usage: A Complete Guide Monitoring memory consumption is a fundamental task for any PostgreSQL administrator. Unlike simple applications, PostgreSQL uses a sophist...

#Postgresql

Origin | Interest | Match

0 0 0 0
Post image

Записки оптимизатора 1С (ч.16). Риски падения Postgres: потребление и высвобождение памяти процессами postgres Статья...

#postgres #perfexpert #падение #postgres #потребление #памяти #postgresql #work_mem #мониторинг #сервера #мониторинг

Origin | Interest | Match

0 0 0 0
Awakari App

Database Indexes: The Secret Weapon Every Backend Engineer Should Master How to make your PostgreSQL queries fly and when to hold back Continue reading on Medium »

#database-design #java #design-systems #postgresql #index

Origin | Interest | Match

0 0 0 0
Preview
Good CTE, bad CTE The planner treats CTEs very differently depending on how you write them. Here's what happens under the hood, version by version, through PostgreSQL 18.

Rewriting badly written CTEs is a constant source of work for me. Not because CTEs are bad. Mostly because developers use them to force execution order on the database.

"First do this, then do that".

Learn more at boringsql.com/posts/good-c...

#postgresql #sql

0 0 1 0
Post image

Если ваш админ — самурай или «обнять и плакать» На конференции PgConf 2026, которая прошла в Москве 23-24 марта 2026 г...

#конференция #postgres #postgresql #1c #бэкапы

Origin | Interest | Match

0 0 0 0
Post image

Если ваш админ — самурай или «обнять и плакать» На конференции PgConf компании Postgres Professional, которая прошла в М...

#конференция #postgres #postgresql #1c #бэкапы

Origin | Interest | Match

0 0 0 0
Post image

Если ваш админ — самурай или «обнять и плакать» На конференции PgConf 2026, которая прошла в Москве 23-24 марта 2026 г...

#конференция #postgres #postgresql #1c #бэкапы

Origin | Interest | Match

0 0 0 0
Preview
"Databases in the Agent Era" with Monica Sarbu, Tue, Apr 14, 2026, 12:00 PM | Meetup Join us virtually on Tuesday, April 14th for "Databases in the Agent Era" with Monica Sarbu. We are entering a new era where AI agents are first-class users of data infras

Join us on Tuesday, April 14th at Noon PDT for "Databases in the Agent Era" with Monica Sarbu! RSVP today!

www.meetup.com/postgresql-1...

@PostgreSQL #PostgreSQL #postgres #meetup

2 2 0 0
Preview
PgDay Boston 2026 Sponsors We are proud to be associated with these fine sponsors, without whom PgDay Boston 2026 would not be possible!

We would love nothing more than to proudly display your company’s logo on our sponsor page! Talk to them today!

2026.pgdayboston.org/sponsors/

#PostgreSQL #postgres #conference

3 3 0 0
Post image

Boost your PostgreSQL skills with Andrew Atkinson at PG DATA 2026!

Reserve your spot: forms.gle/bijKRFF8bc4n...

#PGData #PGData2026 #PostgreSQL 🐘 #SQLPerformance #ORM #DatabaseScaling #DBATraining #TechLearning #OpenSource #HandsOnTraining #DevCommunity

7 1 0 0
Preview
Postgres Summit US 2026 A 3-day PostgreSQL community conference in New York City, USA.

PG Summit US is a community conference sponsored by PgUS, providing Postgres users and developers an opportunity to sharpen their technical skills, build relationships, and connect with a community of professionals passionate about Postgres.

2026.postgressummit.us/about/

#PostgreSQL #postgres

4 3 0 0
Preview
Registration – PgDay Boston 2026 Register now for PgDay Boston 2026!

We hope you’ll be joining us for PgDay Boston! Early Bird tickets are available until April 17th, so get yours today!

2026.pgdayboston.org/registration/

#PostgreSQL #postgres #conference

3 3 0 0
“Extension Development - Lessons From Partitioning and Monitoring” with Keith Fiske
“Extension Development - Lessons From Partitioning and Monitoring” with Keith Fiske Keith says: Working on extensions since their inception in version 9.1, they have basically built my career in the PostgreSQL community. From critical CVEs to quick hacks, this talk will go over both…

The video for our March PUG “Extension Development - Lessons From Partitioning and Monitoring” with Keith Fiske is now available on our YouTube Channel!

www.youtube.com/watch?v=rtH5...

#PostgreSQL #postgres #meetup

3 2 0 0
Preview
PgDay Boston 2026 A 1-day PostgreSQL community conference in Boston, US.

PgDay Boston 2026 is dedicated to providing a safe, harassment-free and enjoyable conference experience for everyone. You can read more about our Code of Conduct here:

2026.pgdayboston.org/code-of-cond...

@PostgreSQL #PostgreSQL #postgres

4 4 0 0
Post image

Level up your DBA skills with Shaun Thomas at PG DATA 2026!

🎓 Trainings are included with your PG DATA 2026 ticket — at no extra cost!

Reserve your spot: forms.gle/bijKRFF8bc4n...

#PGData #PGData2026 #PostgreSQL 🐘 #DBATraining #DBAinABox #DatabaseAdministration #Postgres

0 0 0 0
Preview
Volunteer Introduction Thank you for your interest in volunteering with PgUS! Please complete the requested fields, and we'll be in touch soon! For Committee roles, please note the following: *Each Committee meets once per…

Interested in volunteering for PG Summit US? We have multiple volunteer opportunities available. Fill out the form below and we’ll be in touch!

bit.ly/pgusvolunteer

@PostgreSQL #PostgreSQL #postgres

3 4 0 0
Preview
Health Score для PostgreSQL: один показатель вместо 150 метрик Представьте: вы открываете Grafana в три часа ночи по алерту. На экране — 30 дашбордов, сотни графиков, и везде мигает жёлтым. CPU 60%, connections 50%, replication lag 500ms, bloat растёт, dead...

Health Score для PostgreSQL: один показатель вместо 150 метрик Мониторинг PostgreSQL сломан: 150 метрик в pg_stat_*, и ни одна не отв...

#postgresql #мониторинг #health #score #devops #базы #данных #self-hosted

Origin | Interest | Match

0 0 0 0
Preview
PgDay Boston 2026 Sponsors We are proud to be associated with these fine sponsors, without whom PgDay Boston 2026 would not be possible!

Sponsorship comes in many shapes and sizes. Chances are we have one that is just right for your company! Opportunities are still available, so contact us today!

2026.pgdayboston.org/sponsors/

#PostgreSQL #postgres #conference

3 3 0 0
Preview
[Shoper Gamer] AWS เปิดให้สร้าง Amazon Aurora PostgreSQL ได้ภายในไม่กี่วินาที โดย โดย

AWS เปิดให้สร้าง Amazon Aurora PostgreSQL ได้ภายในไม่กี่วินาที

#ShoperGamer #AWS #PostgreSQL #SQL #AmazonAuroraPostgreSQL #SaaS #Feed

1 0 0 0
Health Score для PostgreSQL: один показатель вместо 150 метрик

Health Score для PostgreSQL: один показатель вместо 150 метрик Представьте: вы открываете Grafana в три часа ночи по алерту. ...

#devops #health #score #postgresql #self-hosted #базы #данных

Origin | Interest | Match

0 0 0 0
Preview
Monte Carlo AI Optimization Strategy BUILDER Python & Software Architecture Projects for ₹600-1500 INR. I’m putting together an end-to-end AI plan that relies on Monte Carlo simulation to drive optimization. The goa



#Data #Science #Java #Machine #Learning #(ML) #MongoDB #NumPy #PostgreSQL #Python #Redis

Origin | Interest | Match

3 1 1 0
CIDR Conference 2026 Looks At Future of Databases Programming book reviews, programming tutorials,programming news, C#, Ruby, Python,C, C++, PHP, Visual Basic, Computer book reviews, computer history, programming history, joomla, theory, spreadsheets...

#CIDR Conference 2026 Looks At Future of Databases-
The Conference on Innovative Data Systems Research, discusses the latest ideas in the database field.We look into what this year was about. : nikosvg.short.gy/17JTzG

#database #postgresql

0 0 0 0
Preview
🇪🇺 Go/Golang job: Senior Go Engineer - Remote (Fully remote, Europe) | Salary: €70,000 - €100,000 Per Annum Senior Go Engineer - Remote Want to help build a disruptive SaaS platform in Healthtech? Fancy working fully remotely? My client, a well-funded (Series A) German HealthTech, is building a global SaaS platform with a strong IoT focus to allow the operation of the medical technology equipment anywh

hiring: Senior #Go Engineer - #Remote in #Fullyremote 🇪🇺 #golang #postgresql #microservices

2 0 0 0
Post image

What Are Database Triggers? A Practical Introduction with PostgreSQL Examples If you've ever needed your database to automatically respond to changes – like logging every update to a sensitiv...

#Databases #PostgreSQL

Origin | Interest | Match

0 0 0 0
Preview
Enforcing polymorphic integrity in PostgreSQL with num_nonnulls #database #pattern #postgresql #sql

🐥 Enforcing polymorphic integrity in PostgreSQL with num_nonnulls

#database #pattern #postgresql #sql

0 0 0 0
Preview
Devart Founded in 1997, Devart is currently one of the leading providers of database management software and ALM solutions for the most popular database servers.

The latest update for #Devart includes "High-Performance Range Queries in #PostgreSQL: Overcoming Bottlenecks in #AWS Aurora" and "Migrating from #MySQL to PostgreSQL: Performance and Replication Best Practices".

#devops #databasetools #databases https://opsmtrs.com/3KjDrTB

0 0 0 0

Welcome Amazon Web Services (AWS) as a Benefactor sponsor of PGDay UK 2026 in London!

2026.pgday.uk/sponsors/

#postgresql #pgdayuk #london

0 0 0 0
Preview
PgDay Boston 2026 A 1-day PostgreSQL community conference in Boston, US.

PgDay Boston is shaping up to be a great conference. But who are we? What are we all about? Click the link below to find out!

2026.pgdayboston.org/about/

@PostgreSQL #PostgreSQL #postgres

3 3 0 0
Post image

Книга «PostgreSQL 16. Оптимизация запросов»: учимся читать мысли планировщика Медленный запрос — это не приговор...

#postgresq #postgresql #книга #база #данных #postgres #pro

Origin | Interest | Match

0 0 0 0