Hubert Lubaczewski

Tags:   postgresql    explain    perl    postgresql    psql    linux   
Category:   Interviews   
Interviewed 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’m Hubert Lubaczewski, but I try to be better known as “depesz” (lower case). I’m 40+ years old with an undying fascination of tech. My personal hobbies (PostgreSQL + Perl + Linux) allowed me to translate to remote work years ago, and have since been loving living in a forest/wooded area. Geographically, I live close to Warsaw, the capital of Poland.

Hubert Lubaczewski

Hubert Lubaczewski

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

Actually - PostgreSQL is my hobby. For fun I’m figuring out stuff, or think about new things I can create to make DBAs’ lives a bit easier.
Outside of computers I love playing board/card games with my family and friends, and watch good tv shows (recently Expanse) or movies, where I have a taste for a rather wide range of topics, though lately I stopped enjoying Marvel/DC movies. When the stakes are as high as they seem to be in movies like Infinity War - I just can’t really care about the outcome.

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

I write my blog on, and try to keep my social media presence to minimum. I don’t have facebook account, don’t really use Twitter, and while I do have LinkedIn, I don’t post there.

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

Last book was Wool by Hugh Howey, and while I can recommend it, and possibly several others, if there is one book that I would really love people to read it’s Daemon/Freedom by Daniel Suarez. These are sold as separate books, but in my mind this is simply one book in two volumes. I don’t want to spoil it, but it has tech, it has social issues, it has a hero, and a couple of rather interesting bad guys.

Any favorite movie, or show?

This is, for me, much harder to answer. I love the TV show “Castle”. It’s predictable, has a common procedural storyline, but I love the general positiveness of people in it. They somehow managed to make a crime drama about murders that makes you like every single recurring character in it.

As for the movie. Most of the people already know good movies, for example from IMDB top 250. So, let me focus on positiveness again, and recommend two movies: Chef by Jon Favreau and Intern by Nancy Meyers.

How would your ideal weekend look like?

Weirdly most of my weekends are ideal - Saturday spent with my wife, with no interruptions, and Sunday - family games day, with some movies at the end.
Nothing spectacular, but that’s how I decompress after a week of work.

What’s still on your bucket list?

The biggest thing for me would be to go see the tropical paradise that is Bora Bora.
For something smaller - learn (find someone that will teach me) how to write SQL parser so I can make actual SQL pretty-printer that is not based on substring matches and substitutions.

What is the best advice you ever got?

It was originally given to me in different words, but it’s best expressed by: Try It And See. In both professional/computer life, and personal - there is no substitute to learning by doing.

When did you start using PostgreSQL, and why?

In 1999. The company I worked for at the time was using Adabas D database, but was considering migrating it’s tools to some open source DB. At the time there were two: MySQL and PostgreSQL. PostgreSQL won, because it seemed to care more about the data than MySQL did.

Do you remember which version of PostgreSQL you started with?

I do. It was 6.5.3. I loved it, and with each release I love it more.

I haven’t. Gave up school after high school (well, in the middle of high school). It created a bit of drama with my family, but in the end, I think I’m OK.

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

Due to work I use a bit of Cassandra and DynamoDB. For blog I have MySQL. But all the real code I write uses PostgreSQL.

Always thinking about how to expand And because of this - how to make a general purpose SQL parser that I could use for it.

How do you contribute to PostgreSQL?

I wrote and support - paste site for explain analyze plans, with some additional logic for presenting information in a way that makes it easier to see where the execution time was spent.
It started as a one-liner in bash that was taking “actual time” info, multiplied it by “loops” to show actual time spent in a given place.
At some point in time I realized that this is useful, and possibly not only for me - made a site that did just that, and then kept adding more features - deleting plans, anonymizing, queries, optimization trees, accounts.
Currently I think I’m happy with the functionality (with the possible exception of lack of handling of JIT info), but would love to change the general look of the site, to be darker. While main background of the page is dark, the main places (input boxes, and where the plan is displayed) are on white, which hurts my eyes when I have to check something in the middle of night.
If anyone reading this knows CSS and has any level of artistic skills, I wouldn’t reject help with restyling the site.

Any contributions to PostgreSQL which do not involve writing code?

I try to help people on IRC, and write blog posts about new, upcoming features of next versions of PostgreSQL. These can be found, obviously, on my blog:

What is your favorite PostgreSQL extension?

pg_stat_statements - it’s the best thing there is for finding slow queries.
And lately - pglogical - for upgrading older DBs with virtually no downtime.

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

The fact that we don’t have planner hints. Given general opposition to the idea (which I kinda understand, but still think that benefits outweigh drawbacks) I don’t think it will ever happen.

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

Ever improving support of partitions, and removing usage limitations related to them. Lately this has been allowing “BEFORE” row-level triggers on them, and allowing logical replication target to be partition.

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

Built in, safe, secure, job scheduler. There are still tasks that need to be done every now and then, and having to depend on external schedulers makes it a bit more complicated.
Plus - having it all in DB would allow me to check/change/monitor it all via SQL.

Could you describe your PostgreSQL development toolbox?

I’m old timer with habits that don’t die. So I don’t use IDE. My development happens in VIM, usually within TMUX (terminal multiplexer on steroids, with TONS of amazing features that you don’t know you love until you try them).
Since my languages of choice are not compiled (SQL, Bash, Perl, Ruby), that’s usually it. Konsole + tmux + vim, and Firefox to check results or read docs.

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

Not being afraid to test things. This is the single most important thing. So many times people ask questions (on IRC ), like: “can I do this …”. Try it! You will learn, and you will get results faster. Create yourself a test Pg instance, and get in the habit of testing every idea. Even stupid ones.

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

The one conference that I’ve been to the most editions of is PGCon in Ottawa. But even that happened only like 3 times.
So far I haven’t submitted any talks, mostly due to stage fright and the fact that I don’t usually make new things for Pg, just work on tools that are potentially useful for DBAs in their work.
I was planning to go to pgDay Paris 2020, but COVID interfered.

Do you think Postgres has a high entry barrier?

No, but we can do better. Most of the things that can go better is making better docs, or blog posts about beginner things.
My single most hated thing related to PostgreSQL was the decision by package maintainers for some (all?) Linux distributions to use “ident/peer” authentication by default for local connections.
This has been a problem for new users since, at least, 2007 - when I wrote a blog post about it, and how to handle it. And it’s still a problem for people now, 13 years later.
The issue is not that ident/peer are bad. These are great ideas. But for someone who knows what they are doing. New users of PostgreSQL try to run “psql -U postgres”, and get hit with “FATAL: Peer authentication failed for user “postgres””.
And it’s a stumbling block for many. Virtually everyone knows what a password is, but what is “peer authentication”?

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

I am not a code contributor, but from what I read - our codebase has excellent comments and docs. Read them. Then figure a thing that you think could be done better, and … don’t code it. Instead - talk on -hackers about it, gather opinions and suggestions, and only then start the actual work.

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

Definitely. I don’t see it disappearing anytime soon. Couple of years ago when the “NOSQL” thing started I was kinda worried that SQL databases would become legacy solutions, but it didn’t happen. As far as I can tell, the world learned how to use the right tool for a given task, and PostgreSQL is the right tool for many things related to data.

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

Absolutely. If your project needs a data store, then I would say: start with PostgreSQL. If, at a certain point in time, you will find out that it’s not perfect - you can always migrate, or use an additional database engine. But for general use cases I don’t think one can think of a database that cares about data more, or has more usable features.

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

I read -bugs and -committers mostly. I try to keep up with -admin , -general , and -hackers , but these are often too high volume for me to be able to keep up with them on a daily basis.

What other places do you hang out?

IRC channel #postgresql on I know that IRC is old-school, and not really fashionable, but it seems (to me) to be more lively, with more talks, than Slack . And I prefer textual interfaces anyway, so IRC is more up to my taste.

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

Unfortunately, lack of C/C++ skills makes me less involved than I’d like to be, but I do watch several projects closely, as I think what they do is important:

Mozilla - they might never make the most popular software, but they are there and provide a way to use the web if you don’t want to use tools made by largest advertising companies.

TOR Project is also doing very important work, one that gets sometimes dismissed as “used by drug dealers and other shady people”, but I firmly believe that everyone has the right to privacy.

Other than that I try to be up to date(ish) on recent developments in Linux (kernel), and KDE (my desktop of choice), but I don’t follow them as closely.

Anything else you like to add?

The biggest positive change in our world, one that can, and will, affect the most people is ongoing work towards legalization of psychoactive substances.
My own country, sadly, lags behind, but I find it inspiring to learn that more and more places allow for medicinal use, or even research, of various substances or plants.

Having some experience with depression, and seeing people around struggling with similar issues hurts, when I know that there are many things that have shown promise in small scale studies, but can’t be tested large-scale due to the legal status of “Magic mushrooms” or Ketamine.

If you, or someone you know, has any kind of psychological issues, try researching it. These things can really do great things. Can doesn’t mean they always will, but it just might work for your case.