Showing posts from March, 2017

Deep dive into postgres stats: pg_stat_bgwriter reports

Everything you always wanted to know about Postgres stats Today, I would like to make a little detour from the main series and will dive into pg_stat_bgwriter. If you’ve been following my previous posts, you will remember that pg_stat_bgwriter view has summary statistics about bgwriter and checkpointer. Here I would like to show an interesting report query which is based on pg_stat_bgwriter. Sources of the query were found in postgres mailing lists and shared by my colleague Viсtor Yegorov and slightly modified by me. This report provides comprehensive information about bgwriter and checkpointer activity and helps to better configure them.

Slides from PGConf RU 2017.

Troubleshooting Streaming Replication from PGConf RU 2017 Moscow This week, I have a pleasure speaking at PGConf RU conference in Moscow. It's very interesting event and I attended it a few times in the past. Every year, conference pleasantly surprises with high level of speakers, interesting program and provides great opportunity meeting new and old colleagues who are also passionate about PostgreSQL.

This year, my talk is about troubleshooting of streaming replication, how to quickly find and eliminate replication' problems.

Here are the slides for my talk. My talk Troubleshooting PostgreSQL Streaming Replication is on 16 March at 12:00 in hall 2. I am very much looking forward to see some of you in Moscow.

Troubleshooting PostgreSQL Streaming Replication from Alexey Lesovsky

Deep dive into postgres stats: pg_stat_bgwriter

Everything you always wanted to know about Postgres statsThis post is about pg_stat_bgwriter view. In my experience, this view is not used very often, however, I think we should take a closer look and understand where is it might become handy.
Official documentation has a very brief description that defines pg_stat_bgwriter as “statistics about the background writer process' activity”. Quite brief, isn't it? In this post I consider pg_stat_bgwriter in details, also take a look on the server’ background writer and checkpointer.

Deep dive into postgres stats: pg_stat_database

Everything you always wanted to know about Postgres stats In this post we continue our discussion about postgres stats. This time we’ll be focusing on pg_stat_database. As mentioned in postgres documentation, this view contains one row for each database in the cluster, showing database-wide statistics. It is well known that postgres may have several databases within single instance, hence this view contains stats about all of them.
You can find full description of view's columns in the official documentation so here I will focus on types of problems that it helps us to solve: Cache hit ratio.Commit ratio.Database anomalies.Load distribution.