Reading time: 9 minutes
PostgreSQL is the World’s most advanced Open Source Relational Database. The interview series “PostgreSQL Person of the Week” presents the people who make the project what it is today. Read all interviews here.
Please tell us about yourself, and where you are from.
I was born and grew up in a town called Crawley, which is about half way between London and the south coast of England, and it’s probably best known for the band The Cure, or the comedian Romesh Ranganathan.
How do you spend your free time? What are your hobbies?
My partner Craig and I have quite a few dogs (French bulldogs, pugs, an English bulldog and chihuahuas), so life usually revolves around them. The weekends are usually spent taking them out and about, especially if there’s a dog event or meet. And we try to get to the cinema as often as possible. One year we vowed to see every film released, but then I was hospitalised with pneumonia for a month, and then COVID came along with all the lockdowns, so that didn’t quite work out. But I love anything from classics like Double Indemnity and Rear Window to the latest action movies.
Any Social Media channels of yours we should be aware of?
Last book you read? Or a book you want to recommend to readers?
“A Flicker In The Dark” by Stacy Willingham. Not bad, but don’t think about it too much or the holes start to appear. I would love to recommend “The Name of the Wind” by Patrick Rothfuss. However, while the 2nd book in the trilogy, “The Wise Man’s Fear” came out 11 years ago, there’s still no sign of the 3rd book. So perhaps hold off until that appears, or, like me, you’ll start forgetting where it left off.
Any favourite movie, or show?
Aliens. It’s perhaps the perfect film. It was so ahead of its time and still stands up today.
What does your ideal weekend look like?
Heading out into the Laines in Brighton, chihuahuas in tow, chilling outside coffee shops and heading to the various bookshops around.
What’s still on your bucket list?
Visit Italy. Authentic Italian food is just the best.
What is the best advice you ever got?
Not sure, but I have advice I’d like to impart. You may have heard “don’t sweat the small stuff”. I think it’s the opposite. Sweat the small stuff, because that’s the stuff that will never get sorted, will constantly affect you and hinder you. It’s amazing what a difference getting rid of those small things makes.
When did you start using PostgreSQL, and why?
I started my interest in PostgreSQL back in 2005. I was used to using Microsoft SQL Server, but I wanted to learn a system that was free, open and feature-rich. It just took off from there, and started to get involved in the community, which was a great way to learn new things.
Do you remember which version of PostgreSQL you started with?
What other databases are you using? Which one is your favourite?
I only really use SQLite in small Python projects. The other database platforms just don’t hold any interest for me.
How do you contribute to PostgreSQL?
Any contributions to PostgreSQL which do not involve writing code?
I previously ran the Google Summer of Code project for PostgreSQL, where I used to get students to submit feature proposals, and paired them up with mentors from the community. That was fun for a few years. I also restyled the docs so that it was easier to read, and set up an interactive filter on the site feature matrix to make it more consumable.
What is your favourite PostgreSQL extension?
I’m going to pretend that postgres_fdw isn’t an extension for the purposes of this question, and it’s too fundamental in my opinion. But my favourite is perhaps a similar extension: file_fdw. I like the ability to “mount” a file, and read it like a local table. It does have its caveats, but it can be really handy to parse and query data that isn’t usually queryable.
What is the most annoying PostgreSQL thing you can think of? And any chance to fix it?
PostgreSQL? Annoying? Watch your language!
What is the feature you like most in the latest PostgreSQL version?
The column and row-level filtering on logical replication. This makes logical replication a super-flexible feature, and sharing live subsets of data really convenient.
Adding to that, what feature/mechanism would you like to see in PostgreSQL? And why?
Sets, that is, a series of unique values. This is essentially the same as the array feature, but unique. This is handy for stuff like tags, where duplicates aren’t wanted. This would provide an analogue to Python’s set functionality. PostgreSQL essentially has lists (arrays), dictionaries (json or hstore) and tuples (er… well, tuples), so this would complete the set. (pardon the pun)
Should PostgreSQL have a built-in connection pooler?
I’m in two minds about this. It feels like connection-management is somewhat an independent problem, but then again, it’s such a common problem that perhaps it should come with Postgres. Let’s say, yes.
Should PostgreSQL have built-in multi-master replication?
In terms of having one shipped with Postgres, I’d support it, although in a supported extension.
Which PostgreSQL conferences do you visit? Do you submit talks?
I haven’t attended any conferences for a while, but I did regularly attend PGConf.EU, and PGCon. I’d say PGConf.EU is an excellent one with a wide spectrum of topics and skill levels. I’ve given a talk on JSON functionality and Materialised Views before, but I’ve mostly been at conferences as staff.
Do you think PostgreSQL has a high entry barrier?
No, not at all. The documentation provides a good introduction for those coming to databases fresh. There is so much to learn, but you don’t need to know a huge amount to get started. And there are mailing lists for novices to ask questions or share their issues. There are no stupid questions, but sometimes it just takes someone to tweak your perspective to see the solution you need.
What is your advice for people who want to start PostgreSQL developing - as in, contributing to the project. Where and how should they start?
Join the hackers mailing list, start following discussions of features and fixes, review patches and learn the conventions used. The PostgreSQL documentation has a whole section on development guidelines which is essential reading, and it’s worth checking the PostgreSQL wiki out for tips too.
Also, importantly, don’t introduce a feature you wish to propose with a set of patches. You may have spent a lot of time working on something that isn’t wanted, or has a problematic design approach. Propose with a proof of concept and a thorough description of what problem it solves, and the thinking behind your design choices. And be open to feedback, especially from experienced developers. Get them on your side and you’ll no doubt have the best chance of success.
Do you think PostgreSQL will be here for many years in the future?
Most certainly. Postgres has come so far and responded to changes in demand. The rise of No-SQL resulted in JSON, JSONB, jsonpath, and even column-store extensions. Now there is development in progress of a pluggable storage system to enable all sorts of potential solutions such as columnar storage, an UNDO log and various other unconventional non-heap storage solutions.
Would you recommend PostgreSQL for business, or for side projects?
Yes. Sorry, did you need a more expansive answer? PostgreSQL is used by a huge number of huge companies, using it for massive, critical and demanding systems, and because it’s free and without licence costs, it’s perfect for side projects too. And with a huge active community, and many companies with paid support, businesses and individuals alike have great options for technical assistance.
Are you reading the -hackers mailinglist? Any other list?
Always. I find it interesting to see what’s coming next, and how it works. I actually subscribe to all the lists, but mainly read -novice, -general, -hackers and pgadmin-support.
What other places do you hang out?
IRC can be pretty good as you can get a lot of eyes on a problem and start getting immediate answers, or follow-up questions without long waits.
Which other Open Source projects are you involved or interested in?
Python is always interesting. It’s a satisfying language that seems to concentrate on being flexible and consistent, which makes it a great pairing with Postgres. And using Python in Postgres as a procedural language is a match made in heaven. Especially with psycopg3, with its simple, elegant and intuitive functionality.
I also use Blender from time to time. It’s a remarkable piece of software with some incredible functionality. The ability to do video-editing, sound-mixing, colour-grading, motion-capture, motion-tracking and a million other things in a single package is mind-boggling. But it’s a beast that’s been through a lot of changes, so staying on top of it all is a mission in itself. I intend to reacquaint myself with it.
Anything else you like to add?
Other tools I would recommend to others are:
PGXN - This is the PostgreSQL eXtension Network, developed by the wonderful David E. Wheeler. Here you can find a plethora of non-core extensions that do all manner of things, and the pgxn software provides a way to search, install and upgrade those extensions.
pgBadger - This parses and analyses your PostgreSQL logs, and the more information you put into your logs, the more useful this becomes. It can be really handy to track down the slowest queries, the queries which overall take up the most time, and many other things. Definitely give it a try.
explain.depesz.com - This is an online tool (which is open source, so you can host yourself), that takes the output of EXPLAIN ANALYZE and shows where the query plan may be going wrong.
pgFormatter - Takes your query and tidies it up into a nicely formatted and readable form. An online version can be found at sqlformat.darold.net.