Álvaro Herrera



Reading time: 11 minutes

Tags:   postgresql (133)   translation (2)   2ndquadrant (8)   edb (15)   hackers (4)   code-review (4)   committer (6)   family (4)   chile (2)  
Category:   Interviews   
Interview conducted by: Andreas Scherbaum

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 am a 1976-vintage Chilean tinkerer who grew up disassembling all manner of things and trying to figure out how to put them back again; my father owned a Z80 computer when I was a kid, and I was amazed at some of the things it did, and it led me into developing an interest in doing things with computers. I started my journey with Linux in 1997 and was amazed at the plethora of things I could do with it – that’s where I really learned to program (in Perl).

I was employed by Command Prompt for several years, doing very interesting projects and working alongside some fantastic people such as Oleksii Kliukin. Then Simon Riggs dragged me to 2ndQuadrant where I did some even more interesting projects. Then the company was acquired and I’m now part of EnterpriseDB, where I continue to be challenged by all manners of things.

I have lived in Chile all my life, currently in the city of Valdivia, with my wife and my three kids. For people to have an idea, Valdivia is as close to the South Pole as Baltimore (US), Toledo (Spain) and Naples (Italy), Ankara (Turkey) are from the North Pole … which is to say, not very close at all! We consider ours a southern city, and while any smart person looking at a globe soon realizes that it’s not so, it took me a great chat over a beer with a PostGIS person to realize that!

Álvaro Herrera

Álvaro Herrera

How do you spend your free time? What are your hobbies?

I spend a lot of time reading, mostly fiction, for myself and for my kids. I also spend some time on amateur carpentry, with a few moderate successes. I like to ride my bike around town looking for any new café where I can sit with my laptop and spend a few hours working on code.

Any Social Media channels of yours we should be aware of?

I tweet a bit, mostly in Spanish, mostly not PostgreSQL-related, at https://twitter.com/alvherre.

My LinkedIn profile is at https://linkedin.com/in/alvherre though there’s not a lot happening there.

Last book you read? Or a book you want to recommend to readers?

My favorite books ever are Frank Herbert’s Dune and Tolkien’s legendarium (Lord of the Rings et al). I am currently reading Cory Doctorow’s Attack Surface, which dystopically describes a nightmarish surveillance near-future; an interesting read that suggests what we should be doing and why we should be doing it. I recently finished Yuval Noah Harari’s Sapiens, which has a few things to say on the related subject of what we have been doing. A few favorite authors: Neil Gaiman, Terry Pratchett, Orson Scott Card, Neal Stephenson, Jorge Luis Borges, Stanislaw Lem.

Some time ago, Mark Wong recommended me to go over the list of joint Hugo and Nebula prize winners; I found good surprises there.

Any favorite movie, or show?

I heard good things about the new Foundation TV series, and being an Isaac Asimov fan too, I am looking forward to it. I also found out that there exists this “Halt and Catch Fire” series which apparently is well worth the time. But I have little patience for TV, and there’s not a lot of movie going recently …

What does your ideal weekend look like?

I would start with not-so-short bike ride to a national park or other nature landscape, carrying my photo camera; spend a couple of hours taking pictures and just enjoying peace and quiet; go back home to relax reading, or to do carpentry, maybe try to make a chair for once; in the evening share a beer or two with the wife and a couple of friends. I would enjoy an orchestra playing some baroque symphony or Glenn Gould playing whatever.

What’s still on your bucket list?

Some more serious trekking; bicycle tourism. Also, visit Moon and Mars once the colonies are there, but always back to the marvellous blue marble.

What is the best advice you ever got?

Spend as much time as possible with your kids, family and friends; nobody ever went to their death beds wishing they had spent more time at their jobs.

Also: if you fail, just try again.

When did you start using PostgreSQL, and why?

I started in 1999. I was working for a very small startup company and didn’t know anything about databases, but it soon became clear we needed one. We didn’t have any money so looking for something free we had to decide between popular MySQL and PostgreSQL. I found an article on the web that suggested that PostgreSQL was the more correct one, so that tilted the scale. It also helped that I found Bruce Momjian’s book, which I used to start my learning path.

That company is still using PostgreSQL, but luckily they rewrote all the Perl prototypes I wrote :-)

How did you get hooked on PostgreSQL?

I was reading the CVS commit log and found a commit message with a challenge: “wish they were all this easy…” referring to a deficiency in the CLUSTER command (commit 565639cde0787f32e20e0b51591a7ad0a07c2aff). That led me to investigate what “they” meant, and from there to attempt fixes. That became my first interesting contribution, 7dc40a2be053a11544c708f576f2bb2858f14aa9 which was also the result of an interesting exchange with Tom and Bruce.

One thing I find super cool about PostgreSQL-the-project is that these ancient mailing list archives continue to exist and be very easy to use; and that these ancient commits that were made in CVS are part of a very clean Git history. The CVS-to-Git conversion is itself legendary; those things seem to hook people up. Working with brilliant hackers is one of the perks of putting up with the (sometimes difficult) PostgreSQL development process.

Do you remember which version of PostgreSQL you started with?

Sure, that was 7.0. It had a few good things that I took for granted; only later I realized that they had been added just in that release. I remember thinking then that PostgreSQL only needed a few extra things here and there and then it’d be complete. It took me several years to realize how flawed that thinking was.

Yes, I studied Ingeniería civil en computación at Universidad de Chile, after spending three semesters doing biotechnology engineering in the same uni. Yes, I do think my engineering degree helps my career, but if the question is whether I could be doing my job without having attended, then I think the answer is still yes; I could have learned a lot of it on my own, for sure. Or maybe looking at it in today’s perspective, then today I would be able to learn those things due to the huge amount of material that’s available. But even my aborted attempt at biotechnology taught me a lot about the world (scientifically) that I probably wouldn’t otherwise, and I think that gives me useful insight too.

What other databases are you using? Which one is your favorite?

I only use PostgreSQL, so that remains my favorite. Of course, I am very biased on this.

I only work on PostgreSQL itself.

How do you contribute to PostgreSQL?

I fix bugs, I write new features, I answer questions from users, I assist my employer’s customer support team. I do a little bit of the sysadmin tasks for the PostgreSQL community too. In 2019 I helped organize a pgDay in Santiago, Chile; I hope we’ll have another one soon.

Any contributions to PostgreSQL which do not involve writing code?

I write some docs too :-) I have also been commitfest manager a couple of times, and I’ve been part of the release management team three times. I sometimes write blog posts, but that’s not very frequent.

What is your favorite PostgreSQL extension?

pageinspect! It has helped me figure out tons of data corruption problems.

What is the most annoying PostgreSQL thing you can think of? And any chance to fix it?

VACUUM is on top of that list, for sure. There was a project to solve that (zheap) but it’s not clear that it’s moving forward at this point. Also, it would be useful to have a concurrent version of CLUSTER; the current blocking implementation makes it pretty much useless.

What is the feature you like most in the latest PostgreSQL version?

I like the new Memoization plan node. I think it can make some queries much better.

Adding to that, what feature/mechanism would you like to see in PostgreSQL? And why?

Columnar stores! I was the one that started that one, with my patch for “pluggable storage” several years ago; I have to thank Simon Riggs for the inspiration and support for that work; it was taken over (at my request) by Hari Babu Kommi and completed by Andres Freund. I think a complete columnar store implementation (including a batch and vectorized executor which can take full advantage of it) is one more step up the long ladder of PostgreSQL success; it is a game changer.

I should also mention MERGE, because it’s the feature I’m working on at present. I would like to see it in PostgreSQL because it would mean I have succeeded :-) I last publicly posted it but I owe a new version with significant changes.

Could you describe your PostgreSQL development toolbox?

I use vim, make, vim, gcc, vim, Perl, vim, some terminal or another. Nothing fancy.

Which skills are a must have for a PostgreSQL developer/user?

They have to master their source code editor so that it allows them to search, jump, and correlate the different parts of the source code. That leads to a more complete understanding of what happens, when it happens, how it happens; that helps them see where to build a new thing and how to build it.

Do you use any git best practices, which makes working with PostgreSQL easier?

I’m not a git superstar. I do a lot of branching, merging, fixing conflicts, using the stash, cherry-picking. I am not super consistent about how I do things; for me, it’s more about getting the damn things done rather than being super strict about how I do them.

Which PostgreSQL conferences do you visit? Do you submit talks?

I like PGConf.EU, but I’ve only been there twice. I’ve been to PGCon in Ottawa a few times too. I’ve submitted and given a few talks, but I much prefer to give talks in Spanish; the PGConf.Brazil people bring me over as much as possible (which I enjoy a lot) but it’s a pity that I can’t give talks in Spanish there either.

Do you think PostgreSQL has a high entry barrier?

From the point of view of a prospective user, I think that for any database there’s a technical entry barrier that means you can’t just jump in the water and hope to float. You’ll sink. The flotation devices are all the tutorials, introductory videos, Slack/Telegram/IRC channels, paid training courses, books. We have these things, so you can keep yourself afloat, but other databases have many more of those things, so you can do so more easily.

In terms of a newbie developer, it’s definitely the case that you’ll need a lot of help, a lot of training, and a lot of patience in order to become a valuable contributor. There aren’t many trivial tasks to keep you busy while you learn your way around.

What is your advice for people who want to start PostgreSQL developing - as in, contributing to the project. Where and how should they start?

Reviewing other people’s patches is a great way: you are forced to learn what the other person is changing, how, and why – a good starting point is the current commitfest.

Do you think PostgreSQL will be here for many years in the future?

Absolutely. It’s definitely the case that with the features and performance we currently have there are a lot more users that could migrate from more expensive/cumbersome/inconvenient database systems to Postgres. In addition, we continue to grow new features, improve existing features, make existing features faster and more scalable; all these things enable further use cases. We continue to grow, and our growth rate also seems to grow.

Would you recommend PostgreSQL for business, or for side projects?

Both. I have helped many businesses that use PostgreSQL as a central piece of their operation. And if you have a simple need, it’s not difficult to have it running.

Are you reading the -hackers mailinglist? Any other list?

I subscribe to (but don’t read all traffic of) -hackers and many other lists (-docs, -bugs, -general, -admin, -sql, -committers). I do follow and reply to unanswered questions in -es-ayuda, the Spanish mailing list, though the traffic has become much lower since a couple of years, not sure why; I think people are using other channels now, such as StackOverflow, Slack, Telegram, etc.

What other places do you hang out?

I am active in a Spanish-language PostgreSQL Telegram channel.

Which other Open Source projects are you involved or interested in?

I’ve submitted very minor patches to things like Neomutt, notmuch … I use the Awesome window manager nowadays, but I don’t think I’ve had to touch anything there.

Anything else you like to add?

Let’s stop burning fossil fuels, shall we?