Designing a monitoring feature in PostgreSQL | POSETTE: An Event for Postgres 2025

Estimated read time 2 min read

Post Content

​ Video of a conference talk that will provide a detailed explanation of designing, implementing, and evaluating a new monitoring feature that delivers dynamic, on-demand statistics in core PostgreSQL. I will describe the monitoring subsystem in PostgreSQL, focusing on the different types of statistics systems such as cumulative and dynamic.

I will then demonstrate how to design and implement a monitoring feature for reporting memory context statistics. This includes discussing how and when to collect statistics, updating shared memory, and defining SQL views for the collected data. I will explore the use of dynamic shared memory for managing non-fixed-amount statistics, with a comparison between DSAs and DSMs. I will illustrate methods for minimizing the overhead associated with collecting such statistics, highlighting trade-offs such as response time of the monitoring query versus its memory consumption. Finally, I will describe the iterative journey of designing this system, examining various design iterations and the pros and cons of each approach. I will describe how to encapsulate certain functionalities, such as sending a request to copy statistics to a process, waiting for new statistics into interfaces. This approach aims to simplify adding similar on-demand statistics in the future.

Rahila Syed has 12 years of experience working as a PostgreSQL developer. She has co-authored patches for WAL compression, default partitioning, vacuum progress checker, column filtering in logical replication and miscellaneous others. She has worked on an extension that provides a distributed database based on PostgreSQL. Currently, Rahila is working at Microsoft designing and developing features for open-source PostgreSQL.

► Video bookmarks:

⏩ 00:00 Introduction and agenda
⏩ 01:06 Types of monitoring systems
⏩ 04:12 Components of a monitoring feature
⏩ 06:17 Need for monitoring of memory contexts statistics
⏩ 10:31 Explanation of DSM and CSA
⏩ 15:44 Details of memory context statistics monitoring feature
⏩19:41 Design iterations of memory contexts monitoring feature
⏩ 23:20 Memory contexts monitoring function signature and output

📕 Everything you need to know about POSETTE: An Event for Postgres 2025 can be found at: https://posetteconf.com

✅ Learn more:
Watch more POSETTE talks: https://aka.ms/posette-playlist

📌 Let’s connect:  
LinkedIn – https://www.linkedin.com/company/posetteconf/
X – @PosetteConf, https://twitter.com/PosetteConf
Mastodon – @posetteconf, https://mastodon.social/@posetteconf
Bluesky – @posetteconf.com, https://bsky.app/profile/posetteconf.com

_________________________________
#PosetteConf #PostgreSQL #monitoring   Read More Microsoft Developer 

You May Also Like

More From Author