Adam Hendel



Reading time: 10 minutes

Tags:   postgresql (208)   open-source (12)  
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.

My name is Adam Hendel and I live in Minnesota (USA). I grew up playing ice hockey and it was a very important part of my life up until age 21. Then I went on to get bachelor degrees in finance and physics and a masters in data science. I served in the U.S. Army military intelligence corps after college. I’ve been working in data science, machine learning, and software engineering ever since.

Adam Hendel
Adam Hendel

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

My wife and I have two kids under age 10, so we spend a lot of time with them. I love trail running and try to run outside on the trails all year round, but when there is too much snow I will sometimes take out my snowshoes. When it gets below -10F I usually run on the treadmill indoors. I like competing in trail races in the 50k-100k distance.

I played ice hockey through college, then got into jiu jitsu while I was in the military. If I had more free time I’d probably get back into both of them. I play tennis about once a month though.

Any exercises you do regularly?

I run 4-5 days a week and do strength training 2 days per week.

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

Are you known by a nickname in the community? If yes, what’s the history?

Chuck, which is short for Charles (my middle name). I go by both names and it probably confuses some people!

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

High Performance Postgresql for Rails. It’s Andrew Atkinson’s book and I think it does a good job introducing users to a lot of concepts and features that they’ve maybe never had to deal with before. The book also goes into some advanced usages that I think are very practical.

Favorite movie, or show?

The new Dune movies are pretty good. I love the movie Interstellar though. The soundtrack is amazing!

Best music, best song?

I listen to Paul Kalkbrenner a lot while I am working. All his songs are great.

Best food?

Pepperoni Pizza

Best drink? Non-alcoholic or alcoholic?

Coffee, Tailwind (Dauwaltermelon flavor), Water, Beer. Probably in that order too!

What does your ideal weekend look like?

Spend time with family, time on a trail run solo or with friends, and some time learning the latest tech or cleaning up tech debt on any of my projects. Sneak in a video game if I have time!

What’s still on your bucket list?

My wife and I lived in Germany for 3 years. We want to take our kids back and show them the house we lived in if it’s still there.

When did you start using PostgreSQL, and why?

I was introduced to SQL using Postgres sometime around 2007-2008. I took a university course on database management systems and Postgres is what the instructor picked, so I guess it was chosen for me!

Do you remember which version of PostgreSQL you started with?

That was probably somewhere late v7.x or v8.x? At the time I was mostly oblivious to what version of Postgres I was using. I was just trying to understand what kind of things I could use a database for!

Computers were loosely related to my degrees. The finance, physics, data science programs all had coursework more focused on the user side of databases. Scientific computing was a big part of the physics and data science degrees, but neither of those programs went as deep as most computer science programs do.

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

I still like working with Redis. Like Postgres, it ‘just works’ most of the time. I am also using Clickhouse.

While it’s not exactly a database, I worked at a few places that did a ton of work with Apache Kafka and I always enjoyed that. Postgres is definitely my favorite though.

I maintain PGMQ and pg_vectorize, and have worked on a few other smaller extension projects (pg_later, pg_timeseries).

PGMQ has been a lot of fun to work on. The project started as a client-side library but that meant it was only usable by users building in a specific language (Rust in this case). The project evolved into a Postgres extension which made it a lot more portable, but still had its challenges since not all extensions are supported everywhere. Most recently though community contributors have made it installable as a stand-alone SQL project, which means you can use it pretty much anywhere Postgres is offered.

How do you contribute to PostgreSQL?

Mostly by contributing to PGMQ and pg_vectorize. I’ve been working on an improvement to pgbench for over a year. I really don’t have a good excuse for not wrapping that up!

Any contributions to PostgreSQL which do not involve writing code?

I am currently working with a few others to get a Postgres meetup organized in Minneapolis. Hopefully we can make that happen!

What is your favorite PostgreSQL extension?

Excluding pgmq, pg_partman has been my favorite for years. It makes it super easy to use and manage partitioned tables. Also, pgvector has been a game changer for working with vectors in Postgres, and gave us inspiration to build pg_vectorize, which extends the functionality of pgvector by giving you a way to generate and manage embeddings directly from Postgres.

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

There are not many annoyances. But there is one bug that Feike Steenbergen explained to me in detail at PGConf EU 2023. This is the “update limit” bug, but in my opinion not a huge issue, so maybe it is an annoyance. Basically it is a case where a “select for update limit” will not respect the limit you give it. So if you use a “limit 5”, you could get 10 records in return, crazy! We use a CTE in pgmq to get around that bug. Feike has that bug pretty well documented here.

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

JSON_TABLE! It’s really great that Postgres supports json, but working with json data once it’s in Postgres is kind of a lot of work. To me, the structure that JSON_TABLE provides around json data makes it easy to work with again.

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

Something along the lines of CREATE HASHTABLE my_cache (key text, value jsonb); would be so awesome. Basically giving users access to an in-memory key-value store, but in Postgres. I think there’s a ton of Redis use cases that would work just fine in Postgres if this were possible. Maybe it doesn’t belong in PG though, I’m not totally sure.

Should PostgreSQL have a built-in connection pooler, or built-in multi-master replication?

I’ve kind of gone back and forth over the years about what I think should be “built-in” features. On one hand, it’s beneficial that these projects/features, like connection pooling, vector types and operations, multi-master replication, are not baked into Postgres directly because it means those projects can progress at their own pace and follow their own development patterns.

On the other hand, newcomers to Postgres have to discover for themselves that those other projects exist. For example, I won’t find “pgBouncer” or “pgvector” if I search the official Postgres docs. If I’m a newcomer to Postgres, I have to go learn that extensions are a thing and that I can use pgvector to work with embeddings in Postgres.

I think it would be great if some of the community projects, like pgvector or pgBouncer, could get some sort of official “nod” from Postgres in order to help signal the capabilities available to users of Postgres.

Could you describe your PostgreSQL development toolbox?

VS Code + Cursor, DBeaver, psql (I install w/ pgenv) are the tools I directly interact with. I’ve been using DBeaver since ~2015 (10 years now!). I remember trying to get DBeaver to work for some Hadoop things a while back and it didn’t work so well, but it always worked really well with Postgres so I keep coming back!

Currently I work in Rust and Python the most. For Python apps I reach for psycopg (version 3). I really love that it has an API for COPY. In Rust, it’s SQLx for me 100%. I love working with both these frameworks.

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

SQL is a must-have as a user. Inevitably something will go wrong though, so troubleshooting is also very important.

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

Almost everything I work on relies on git. For Postgres specifically I always put SQL DDL in source control, and through some sort of SQL schema migration framework or tool (SQLx or alembic usually).

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

I gave talks at PGConf.EU in 2023 and 2024 and attended PGConf.NYC in 2023. Those conferences were great, very well managed and have awesome communities.

Do you think PostgreSQL has a high entry barrier?

The barrier to entry in Postgres is incredibly low as a user. If you know other SQL then you can get started using any of the managed cloud providers or just start Postgres on your local machine with postgres.app or Docker. I can’t think of any ‘gotchas’ that could give someone a poor first experience with Postgres. Postgres has been around a long time so there’s endless blogs and documentation on the internet for people to discover. Probably as a side effect to the amount of publicly available documentation, most of the AI tools out there do really well working as a Postgres user too.

It’s also very robust so you can get away with making really poor design decisions (speaking from my own experience), or have poorly written queries, and have it just keep working for you. In my opinion, all these things make it really easy to get started.

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

Definitely. Lots of companies build their applications on Postgres and there are talented engineers working on the core project.

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

I passively follow -hackers and -general.

What is your opinion on ORMs?

I love that ORMs provide a link between objects in my code and objects in the database. They give confidence (or at least the illusion of) consistency between my codebase and the database, which makes me think “the code will work”.

What I don’t love is that they tend to abstract away a lot of features that databases provide. Constraints, foreign keys, custom functions and data types, etc. I know there’s ways around that though.

I think I’m biased on this topic, since I learned SQL before I learned about ORMs. There’s a project in Rust called SQLx that I really love to use. It’s the best of both worlds for me. I can write raw SQL in the application, and have the SQL + objects checked at compile time against the database.

SQL versus NoSQL databases?

It seems like NoSQL has tried to become more like SQL over the years. NoSQL data stores definitely have their place for certain use cases though.

What other places do you hang out?

I hang out in the Postgres Slack community, and People, Data Postgres Discord, mostly around the PGRX (Rust framework for building postgres extensions) community.

Which other Open Source projects are you interested in?

There are so many. Hugging Face is always releasing frameworks making machine learning projects more enjoyable. I really love psycopg3, especially because they have an API for pg copy. SQLx, actix-web.


Share: