Magnus Hagander

Reading time: 8 minutes

Tags:   postgresql (170)   pgeu (3)   committer (6)   core (3)   blamemagnus (1)  
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 was born and live in the area of Stockholm, Sweden. I’ve been involved with PostgreSQL for a long time, and been working full time with or nearby PostgreSQL for a bit over 10 years, as a consultant with Redpill Linpro in Stockholm (though customers are all over the Scandinavian region).

Magnus Hagander

Magnus Hagander

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

What is this free time you speak of? After doing both “actual work” and “community work”, is there supposed to be time any time left over?

That said, in the summertime when it’s season for it, I spend a lot of time sailing. Which is also a great excuse for just not checking emails and chats and whatnots, and ignoring everything.

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

What does your ideal weekend look like?

It’s spent in the archipelago, on a boat, with good friends!

What’s still on your bucket list?

Did not manage to tick off Oceania as a travel destination prior to the pandemic hitting, so I’m looking forward to a future where that will be doable again.

When did you start using PostgreSQL, and why?

If memory is right, I used it first around 1996 when it was Postgres95, and just for testing and experimenting. Then I had a few years break, and came back to it properly around 1998/1999 and have been using it since. At the time, I needed a database for a side project where there was no budget for licensing the “proper database engines” that the organisation used at the time. And since I needed a proper database, PostgreSQL was really the only option around (MySQL at the time had nowhere near the functionality I needed, and there weren’t really any other options around).

Do you remember which version of PostgreSQL you started with?

Postgres95 1.01 for that initial testing run, 6.3 when I started using it “properly”.

For a long time, I had a code comment in a system (in production) that said something like “we will fix this query when 6.4 comes out because it adds support for HAVING”. I fixed that when upgrading to 9. I think.

I did, initially studying Electrical Engineering, and then switching to Computer Science. This is where I got in touch with Postgres95 the first time, so it definitely helped setting me on the track of PostgreSQL, and in the end that is what got me hired into my current job - but by a very long route.

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

Today, most other databases I use are only in the context of working on projects helping customers migrate away from those databases to PostgreSQL – in this case it includes Oracle, MSSQL, Sybase,DB2 and MySQL/MariaDB as the biggest ones.

As for databases I actually use now, SQLite is the primary other one – which is an excellent choice for anything embedded and anything where adding a server makes it unnecessarily complicated.

I’m involved in a lot of projects in the PostgreSQL ecosystem, such as the website, the PostgreSQL Europe systems, a lot of the infrastructure management things we have, and of course on PostgreSQL itself.

How do you contribute to PostgreSQL?

Through many different venues. I do write some code for PostgreSQL itself, but that’s definitely one of the smaller parts. I work with the infrastructure team to keep services up and running. I’m on the core team and on the board of PostgreSQL Europe which in both cases these days means dealing with necessary paperwork and leaglese so that the wider community doesn’t have to. I try to answer questions on our lists and other forums when I have a spare moment, and I work with the different groups that arrange conferences and meetups (less of that now in the pandemic, but I’m hoping we’ll get back to meeting each other in person soon).

Any contributions to PostgreSQL which do not involve writing code?

Many, from questions/answers and documentation to dealing with paperwork and such things. There are many ways to contribute to PostgreSQL – and while important, code is one of the more niche ones.

What is your favorite PostgreSQL extension?

Shipping as part of PostgreSQL, pg_stat_statements. Shipped externally, probably PostGIS.

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

Probably memory management – properly getting the memory system optimally tuned is basically impossible, and the price of getting it wrong can be a hard crash. It can certainly be fixed, but it’s a very hard problem.

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

There are many, but if I have to pick one, it’ll have to be the btree deduplication.

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

The skills required for a PostgreSQL developer and a user are fundamentally completely different, and that’s part of the reason we have PostgreSQL. As a PostgreSQL developer, you need to be skilled in C and low level coding to modify and manage the system.

But as a PostgreSQL user, you can use whatever toolset you want, so the skillset more comes to having a good general understanding of how relational database systems work, and then to have an open mind and be interested in learning – because all systems are slightly different.

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

The most important one is definitely “make sure everything is in version control”. It doesn’t even have to be git, though that is my tool of choice when I get to do it. Oh, and specifically for git, “when in doubt, use yet another branch”.

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

As many as I can manage! I find attending these conferences, in particular the ones that are community oriented rather than commercially focused, to be an excellent way to meet and interact both with other PostgreSQL developers and community members, and with people who are using the system but aren’t really involved in the community. The main ones are obviously going to be PGConf.EU, FOSDEM PGDay and Nordic PGDay which I’m involved with organising, and also PGCon (the main developer-focused conference), PostgresOpen (the big community conference in USA) and numerous pgdays around that I try to be a regular at. I will typically submit talks to the ones where I am not an organizer or the ones where I know I will be very busy with meetings and workshops.

Do you think PostgreSQL has a high entry barrier?

I think these days the barrier of actual entry is very low. Getting a “postgres up and running” for someone new is trivial on most platforms. However, there’s still a pretty high barrier to get to a stage where your choice to use PostgreSQL really starts to pay off. Far too many get stuck at using PostgreSQL well below it’s capabilities because of this barrier – and I think that’s definitely something we need to work on.

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

Start with reviewing some existing patches. Go to the latest Commitfest and find something interesting. Even a simple review is useful, and it’s a great way to get used to the process and workflows, and get a basic familiarity with the code.

When it’s time for an actual patch, start with something simple, to get used both to the codebase and the process. And if possible, find somebody who can help mentor you “on the side”. Going directly to -hackers can be an overwhelming experience if you aren’t used to it.

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

Yes, definitely.

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

Yes. There is no or, Postgres is a great choice for both.

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

I am, though I won’t claim to read every message and every thread, that’s more or less impossible these days. And I’m also on about 45 other lists at, so there is a lot of email.

What other places do you hang out?

I do hang out in the #postgresql IRC channel, but I seldom have time to actually interact in it. Other than that I mostly hang out in the closed or semi-open channels on other platforms, rather than the big public ones – simply because of lack of time.

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

I used to be more active in some other projects before, but these days most of my contact with other projects are just things like simple bug reports or fixes, not any actual project involvement.

Anything else you like to add?

To pre-empt your comments about me being late, I’d like to point out that you sent me the questions for this interview on Feb 6th, and I’m actually responding on Feb 6th. So I am clearly not late, and any delays are either on your side or in the network!