Haki Benita



Reading time: 5 minutes

Tags:   postgresql (133)   sql (4)   dba (6)   django (4)   python (6)  
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’m Haki Benita. I’m living with my family in a city near Tel-Aviv. My interest in development started at around junior-high, and I’ve been working as a professional developer since I was 18.

Haki Benita

Haki Benita

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

I have a pretty busy schedule so I try to spend most of my spare time with my family. When I do manage to find some time for myself, I usually write on my website hakibenita.com.

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

I write about PostgreSQL, SQL, Django and Python on my personal web site hakibenita.com. When I have random thoughts about interesting technical things, I usually share them on twitter.

What is the best advice you ever got?

Maybe not the best, but one that most people can benefit from - whenever you go to a meeting, always grab a notebook, even if you have nothing to write - it makes you look more serious.

When did you start using PostgreSQL, and why?

My first professional role as developer was as an Oracle DBA. Back then, I had no idea what a DBA is, and I was not particularly interested in databases. In fact, most of my professional training and formal education was focused on traditional development using C# and Java.

After a few years working as an Oracle DBA for a large company, I became a team leader. When I finally left, I started working in a small company in the public transportation space. We developed new and original products and we needed a database. I no longer had an unlimited Oracle license, so I looked for the closest thing, which at the time was PostgreSQL. The rest is history.

Do you remember which version of PostgreSQL you started with?

I believe it was 9.4

I have a BA in CS and Economics and an MBA. Everything I studied, whether it was related directly to software development or not, contributed to my job. There are a few classes that I remember more than others - data structures, database development (mostly about index structure and normal forms).

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

I used Oracle for a long time and I occasionally dabble with SQLite, but PostgreSQL is my go-to database, no doubt.

Any contributions to PostgreSQL which do not involve writing code?

I’m hardly proficient enough with C or PostgreSQL internals to contribute directly to the source, but I do feel my articles and the training I give on how to best use PostgreSQL is my way to contribute to the PostgreSQL community.

What is your favorite PostgreSQL extension?

pg_stat_statements, pg_repack

I find pg_stats_statemnts really useful for identifying heavy queries after the fact. When you get an alert or a complaint from a user, you don’t always get to see the problem in real-time, so it’s useful to be able to query for long running queries, or short queries that are executed repeatedly and consume a lot of resources.

I also often use pg_repack to rebuild tables without downtime, and free up some space. I wrote a bit about my experience with pg_repack here.

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

B-Tree deduplication in PostgreSQL 13 had an immediate effect on our systems. The database became much lighter, and it was noticeable.

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

Columnar storage - I think this has the potential of making PostgreSQL more attractive for analytics.

Force TOAST- A very common optimization I see very often is moving medium (and usually infrequently used) toastable columns to a separate table. I wrote about it here. I really wish I could force columns to be stored out-of-line regardless of their compressed size. I think that changing your schema solely for performance considerations is a good hint the database is missing a feature.

Could you describe your PostgreSQL development toolbox?

That’s an easy question… psql with very few customisations in .psqlrc

I like to keep it light. I think that any DBA or developer working with PostgreSQL needs to be able to ssh into a server and start working. Relying on tools too much makes you forget the basics.

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

The skills I foster in my team are curiosity, critical thinking and the ability to learn complicated topics on your own.

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

Since most conferences moved online I had a chance to speak at several conferences, including FOSDEM and Postgres Build. I also speak about PostgreSQL related topics in other conferences such as DjangoCon, Euro Python, Pycon etc.

Do you think PostgreSQL has a high entry barrier?

It’s been a while since I had to get into PostgreSQL so it’s hard to remember. I do think that PostgreSQL keeps improving, and that it becomes harder to make devastating mistakes, so in this sense it’s probably easier to get started than it used to be.

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

Definitely. PostgreSQL is the best kind of “boring tech” - it’s reliable, stable and gets the job done! I think PostgreSQL has a very strong community, and a good set of features to accommodate modern application requirements. I also keep hearing about larger companies moving to PostgreSQL which is a good indication the product is maturing.

What other places do you hang out?

I’m active on Twitter and lurking on Telegram.

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

I’m also interested in Django and Python. I actually wrote a lot about the interface between Python, Django and PostgreSQL, and how to make the most of these together. Lucky for me this has become somewhat of a popular stack!

Anything else you like to add?

I really like reading the PostgreSQL Person of the Week. It’s great to read about other people in the community and the type of work they do with PostgreSQL. Keep it up!