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
The BDR team has recently introduced support for dynamically adding new nodes to a BDR group from SQL into the current development builds. Now no configuration file changes are required to add nodes and there’s no need to restart the existing or newly joining nodes. This change does not appear in the current 0.8.0 stable release; it’ll land in 0.9.0 when that’s released, and can be found in the...
Technical Blog
For a couple of years now a team at 2ndQuadrant led by Andres Freund have been working on adding bi-directional asynchronous multi-master replication support for PostgreSQL. This effort has become known as the BDR project. We’re really excited to see these efforts leading to new PostgreSQL features and have a great deal more still to come. Incremental Development As a large development project it...
Technical Blog
Sometimes SELECT pg_backend_pid() and gdb‘s attach aren’t enough. You might have a variable in shared memory that’s being changed by some unknown backend at some unknown time. Or a function that’s called from somewhere, but you don’t know where or when. I’ve recently been doing quite a bit of work on code where bgworkers launch other bgworkers, which launch more bgworkers. All of them communicate...
Technical Blog
I’m seeing reports of a number of issues with PostgreSQL after upgrades of OS X machines to Yosemite (OS X 10.10) that I’m concerned about, so I’m seeking more information about the experiences of PostgreSQL users who’ve done OS X 10.10 upgrades. I can’t confirm anything yet, but back up all your databases before any upgrade to OS X 10.10. Just in case. (Of course, you do that before any upgrade...
Technical Blog
I’ve always worked on PgJDBC, the JDBC Type 4 driver for PostgreSQL, with just a terminal, ant and vim. I recently had occasion to do some PgJDBC debugging work on Windows specifics so I set up Eclipse to avoid having to work on the Windows command prompt. As the process isn’t completely obvious, here’s how to set up Eclipse Luna to work with the PgJDBC sources. If you don’t have it already...
Technical Blog
A while ago I wrote about compiling PostgreSQL extensions under Visual Studio – without having to recompile the whole PostgreSQL source tree. I just finished the pg_sysdatetime extension, which is mainly for Windows but also supports compilation with PGXS on *nix. It’s small enough that it serves as a useful example of how to support Windows compilation in your extension, so it’s something I think...
Technical Blog
RPMs for BDR (Bi-Directional Replication for PostgreSQL) are now available for testing. They contain BDR release 0.7.1, which is based on PostgreSQL 9.4beta2. Because there may be an on-disk format change (catversion bump) before PostgreSQL 9.4.0 final, and because these RPMs are quite new, this should be considered a test release. RPMs are available for CentOS 5, 6 & 7 and Fedora 19 & 20. The...
Technical Blog
Shaun Thomas’s recent post about client-side loops as an SQL anti-pattern is well worth a read if you’re relatively new to SQL-based application development. It’s reminded me of another SQL coding anti-pattern that I see quite a lot: the naïve read-modify-write cycle. Here I’ll explain what this common development mistake is, how to identify it, and options for how to fix it. Imagine your code...
Technical Blog
As part of AXLE project work I recently found myself re-examining issues around optimisation fencing and non-semantic query execution changes in PostgreSQL. One key issue was the inability to use a CTE where optimisation (inlining, push-up/pull-down, flattening, etc) was desired. I’d like to explain that in more detail, as it’s something that can surprise new and experienced PostgreSQL users alike...
Technical Blog
I periodically see people being advised to put their tablspaces on RAM disks or tempfs volumes. This is very bad advice. Do not put a PostgreSQL TABLESPACE on a RAM disk or tempfs. Why you shouldn’t put a tablespace on a ramdisk Unlike MySQL and some other databases, PostgreSQL tablespaces are not completely independent of the rest of the database system. You can’t just throw a tablespace away and...