Andrew Dunstan

Andrew Dunstan is a Senior Principal Engineer at EDB. He has been contributing to the PostgreSQL project for more than 20 years, and for most of that time has been one of the project's core committers.

Among the features he has contributed to are the Windows port, CSV import and export, parallel pg_restore, and the JSON and JSONB data types and associated functions. In 2004 he created the PostgreSQL Build Farm, which he still maintains.

Andrew joined 2ndQuadrant in 2016 and EDB in 2020 when it acquired 2ndQuadrant.

Read Blogs

Technical Blog
Announcing Release 9 of the PostgreSQL Buildfarm client. Along with numerous fixes of minor bugs and a couple of not so minor bugs, this release has the following features: new command line parameter --run-parallel for run_branches.pl runs all branches in parallel, possibly across animals as well new config setting max_load_avg inhibits a run if the load average is higher than the setting new...
Technical Blog
In PostgreSQL version 10 or less, if you add a new column to a table without specifying a default value then no change is made to the actual values stored. Any existing row will just fill in a NULL for that column. But if you specify a default value, the entire table gets rewritten with the default value filled in on every row. That rewriting behavior changes in PostgreSQL 11. In a new feature I...
Technical Blog
Postgres contains a moving event horizon, which is in effect about 2 billion transactions ahead of or behind the current transaction id. Transactions up to 2 billion ahead of or more than 2 billion behind the current transaction id are considered to be in the future, and will thus be invisible to current transactions. Postgres avoids this catastrophic data loss by specially marking old rows so...
Technical Blog
The video of my presentation below walks you through the major features of the native JSON data type in PostgreSQL 9.3 and beyond. https://www.youtube.com/watch?v=BtFes871CN0 This presentation covers the following topics: What is JSON? How is it available in PostgreSQL? What’s the difference between JSON and JSONB? Accessing JSON values Creating JSON from table data Creating table data from JSON...
Technical Blog
Recently I have been refining and adding utilities to look after our Perl code. You might be surprised to learn that as well as 1.3 million or so lines of C code, there are about 30,000 lines of Perl code in our sources. This a sizeable body of code, even if it’s dwarfed by our C code. What does it do? Well, lots of things. It runs some very critical code in building from source, so the code to...
Technical Blog
If you have Docker installed on your development machine, there is a simple way to road test your code using the buildfarm client, in a nicely contained environment. These preparatory steps only need to be done once. First clone the repository that has the required container definitions: git clone http://github.com/PGBuildFarm/Dockerfiles.git bf-docker Then build a container image to run the...
Technical Blog
I have just release version 8 of the PostgreSQL Buildfarm client It can be downloaded from http://buildfarm.postgresql.org/downloads/releases/build-farm-8.tgz or http://github.com/PGBuildFarm/client-code/archive/REL_8.tar.gz This release contains a number of small changes to make using the --from-source feature a bit nicer. It also contains a good deal of code cleanup to be perlcritic clean, with...
Technical Blog
I have released version 6.1 of the PostgreSQL Buildfarm client. It is available at http://buildfarm.postgresql.org/downloads/releases/build-farm-6_1.tgz This release fixes a couple of bugs that became apparent in yesterday’s release. The first was a relatively minor one where the verbosity was always set if using the run_branches.pl script. The second was a portability issue where some versions of...
Technical Blog
PostgreSQL Buildfarm client Release 6 is now available and can be downloaded from http://buildfarm.postgresql.org/downloads/releases/build-farm-6.tgz Features use a persistent cache for configure, leading to a substantial performance improvement for that step, based on an idea from Tom Lane improve installcheck security, mirroring earlier changes on this in Postgres itself allow skipping...
Technical Blog
Recently we’ve had a patch submitted to support the latest incarnation of the Microsoft build tools, Visual Studio 2017. I didn’t have a spare Windows machine available to test with, so I set up Windows machine on Amazon AWS to test with. I chose Windows Server 2016, a t2.medium instance with a 50 GB root disk (The default 30Gb is a bit tight.) This costs about US$0.065 per hour to run, so it’s...