Kubernetes metric container_memory_working_set_bytes is used for evicting/killing pods with too much memory use, especially if memory request < limit (don’t do this with Postgres). The metric is calculated from cgroups v2 memory.stat as current-inactive_file [source]. You’d assume it’s a good metric for memory usage in kubernetes. But with Postgres, this metric is very inaccurate for … Continue reading
My previous article talked about the checkpoint happiness hint: You probably should not change the checkpoint_timeout setting from its default of 5 minutes. Checkpoint Followup Questions A good follow-up question was raised: can an HA replica can save you from downtime if you want to set a large checkpoint_timeout? It’s true that Postgres allows promoting … Continue reading
Before starting, I want to put a few things at the top: Checkpoint is the heart of your database. It’s buried deep inside. It’s not something everyone talks about, like well-tuned autovacuum or fast queries. But if checkpointer stops beating, then you’re dead. In addition to its well-understood job of getting dirty pages written from … Continue reading
I’m back home from Vancouver. What a great week – in every way. I’ll try to share a few highlights here. Updated Happiness Hints First and foremost: after many years, the Happiness Hints have received a major update! Before the conference, I updated the hints based on all the feedback I’ve collected over the past … Continue reading
A few days ago, Shaun Thomas published an article over on the pgEdge blog called [Checkpoints, Write Storms, and You]. I left a few comments [on LinkedIn]. This article is a great technical read about an important and overlooked topic – and I always love seeing real test results to illustrate the details. I don’t … Continue reading
What is the best way to manage database schema migrations in 2026? Since this sort of thing is getting easier with AI tooling, I spent some time doing a survey across a bunch of recognizable multi-contributor open source projects to see how they do database schema change management. Biggest takeaway: the framework provided by your … Continue reading
Open Source communities are trying to quickly adapt to the present rapid advances in technology. I would like to propose some clarity around something that should be common sense. Automated emails are spam. They always have been. Openclaw (and whatever new thing surfaces this summer) is no different. Policies saying automated emails/messages are banned – … Continue reading
Edit: related blog published Feb 22 – Openclaw is Spam, Like Any Other Automated Email My personal blog here is dedicated to tech geek material, mostly about databases like postgres. I don’t get political, but at the moment I’m so irritated that I’m making the extraordinary exception to veer into the territory of flame-war opinionating… This … Continue reading
Saw this post on LinkedIn yesterday: I also somehow missed this setting for years. And it’s crazy timing, because it’s right after I published a blog about seeing the exact problem this solves. In my blog post I mentioned “unexpected behaviors (bugs?) in… Postgres itself.” Turns out Postgres already has the fix; it’s just disabled … Continue reading
This article is a shortened version. For the full writeup, go to https://github.com/ardentperf/pg-idle-test/tree/main/conn_exhaustion This test suite demonstrates a failure mode when application bugs which poison connection pools collide with PgBouncers that are missing peer config and positioned behind a load balancer. PgBouncer’s peering feature (added with v1.19 in 2023) should be configured if multiple PgBouncers are being used … Continue reading
Recent Comments