Craig Ringer

Senior Staff SDE

Craig Ringer is a Senior Staff SDE based out of Wellington in New Zealand. He was one of the early developers of the 2ndQuadrant BDR distributed multi-master replication software that later became EnterpriseDB Postgres Distributed. He is a recognised PostgreSQL contributor with contributions including libpq pipelining mode, logical replication improvements, and data protection fixes (reporting "FSyncgate").

 Craig's work touches many wildly varied areas, but he is currently focused on observability in Kubernetes-based cloud environments using technology including OpenTelemetry, Prometheus and Thanos. He enjoys solving complex problems that cross many layers and components. Contributing improvements, fixes, documentation and test cover to upstream projects are personal priorities, as he believes that it's important for companies to give back to open source projects. When not at a laptop, Craig enjoys building remote control aircraft, hiking, and visiting Wellington's beautiful beaches.

Read Blogs

Technical Blog
Debugging software in a containerised environment can be challenging. The software itself is generally stripped-down, in a minimal runtime environment with none of the usual auxiliary tools available. It runs with minimal permissions, and is generally not directly visible or accessible from sessions that have greater privileges. Thankfully on Kubernetes, updates to the ephemeral containers feature...
Technical Blog
Or: Why, and how, Prometheus selects Kubernetes targets to scrape. While it's not good practice, sometimes it's necessary to have Prometheus connect to a metrics port that is not declared in the Pod's manifest as an explicit Port. For example, the Pod may be managed by an operator that lacks an extensible PodTemplate. portNumber is a selector not an instruction Intuitively, you might expect to use...
Technical Blog
This is the first in a planned series of articles to focus on Prometheus, PromQL, Thanos, metrics and observability in the k8s space. I will be focusing on less-explored areas like some of the challenging quirks of Prometheus's PromQL, adapting to PromQL from a relational database SQL background, and running the Prometheus family in a memory-constrained environment. Why does Prometheus remove...
Technical Blog
Logical decoding and logical replication is getting more attention in the PostgreSQL world. This means we need it working well alongside production HA systems – and it turns out there’s a problem there. Replication slots are not themselves synced to physical replicas so you can’t continue to use a slot after a master failure results in promotion of a standby. The failover slots patch changes that...
Technical Blog
I got tired of looking up regression_output/log/postmaster.log to find the PGSOCKET to use to connect to a running pg_regress‘s temp-install postgres so I wrote a little shell function for it. My patch to print a connst in pg_regress never got merged so I needed a workaround. I’m sure I’m not the only one, so here’s regress_psql for your convenience. Pop it in your bashrc and invoke it from the...
Technical Blog
In a developer’s ideal world there’s only one stable and one development version of the product. Everyone updates immediately to the next stable version and nobody cares about anything older. As far as I can tell this has never actually happened, ever, in the history of anything. Working on many versions PostgreSQL is a mature and stable codebase. Users often run very old versions and they are...
Technical Blog
Docker Hub carries Docker images for PostgreSQL, based on Debian Stretch or Alpine Linux. These are not official PostgreSQL Development Group (PGDG) images from postgresql.org, they’re maintained in the Docker Library on Github. But as Docker adoption grows these are going to become more and more people’s first exposure to PostgreSQL. I tried these images out as I needed some convenient and simple...
Technical Blog
PostgreSQL uses error context callbacks to allow code paths to annotate errors with additional information. For example, pl/pgsql uses them to add a CONTEXT message reporting the procedure that was executing at the time of the error. But if you get it wrong when you use one in an extension or a patch to core, it can be quite hard to debug. I’d like to share some hints here for people involved in...
Technical Blog
Unless you were in Sydney for linux.conf.au 2018 last week you probably didn’t see my talk Geographically distributed multi-master replication with PostgreSQL and BDR. Luckily for you it’s on archive.org and YouTube. If you’re interested in multi-master replication of any sort, even non-PostgreSQL-based multi-master, it should be worth taking a look. The talk could’ve been better titled...
Technical Blog
There’s a lot of information out there on how to configure PostgreSQL, on the importance of backups and testing them, etc. But what about the server you run PostgreSQL on? We tend to pay a lot less attention to tools that you won’t need unless something breaks. But it’s worth taking some time to do so now, because that’s time you won’t have when your server is down and you’re in a rush. Debuginfo...