Andrew Atkinson
Reading time: 19 minutes
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 a programmer, dad, and husband, and live with my family in Minneapolis, Minnesota, a northern state in the USA. I’ve worked remotely as a software engineer for more than 15 years at big companies like Microsoft and Groupon, and many small and mid-sized startups, scaling up their platform. My formal education was through the University of Minnesota where I earned two bachelor’s degrees that didn’t overlap much. One was in IT Infrastructure the other in Spanish studies, which gave me the chance to live abroad for a bit in Toledo, Spain. These days, I identify with the concept of an Application DBA (Credit: Haki Benita) or accidental DBA, working as a backend engineer with web applications, but as a specialist with Postgres and database performance.

How do you spend your free time? What are your hobbies?
Over the last two years I was writing a book (book: High Performance PostgreSQL for Rails), and chose to sacrifice a lot of my hobbies to make more time for writing. Now that the book is done, I’m getting back into things away from the computer. In warm summer weather, my family rides bikes, swims, and takes road trips. In Winter, we both travel to warm places, and also embrace the colder weather for downhill skiing and ice skating. My personal hobbies include practicing the piano, practicing speaking Spanish, and following the Timberwolves NBA team. My most recent hobby is learning to play pickleball, which is a lot of fun!
Any exercises you do regularly?
I have gotten more into distance running in the last 10 years, running a half marathon, 10 mile, and 10 kilometer races, mostly for general fitness. I still like to run, and squeeze in podcasts on the treadmill.
Any Social Media channels of yours we should be aware of?
- LinkedIn: in/andyatkinson
- speakerdeck.com/andyatkinson
- Website: andyatkinson.com
- Newsletter: pgrailsbook.com
- X/Twitter: andatki
- Mastodon: @andatki@mastodon.social
- Bluesky: andatki
Last book you read? Or a book you want to recommend to readers?
I’m currently reading Postgres 14 Internals by Egor Rogov, and it’s excellent! The last non-fiction software industry book I read was “Staff Engineer” by Will Larson, and I recommend it for people pursuing senior and staff+ engineering careers at companies. The last fiction book I read was Crytonomicon by Neal Stephenson, which was a number of years ago, and I really enjoyed that. My older kid has started reading the Harry Potter books, so we’re also watching the movies now as a family.
Favorite movie, or show?
In general I like dystopian future or immersive space sorts of movies that are heavy on cinematography, mood, and environments, and help me imagine the future. Sometimes the future is bleak. I loved all the Matrix movies, Ad Astra, and Blade Runner 2049. For shows I was a huge fan of The Wire, Breaking Bad, and Better Call Saul. These days my spouse and I watch 1 hr. comedy specials with different stand-up comedians on Netflix and we love to occasionally attend live comedy.
Best music, best song?
Growing up in the 80s and 90s, I loved a lot of rock and pop music from that era. Rage Against the Machine, Sublime, Radiohead, I’m also an electronic music and EDM fan like Daft Punk, deadmau5, or Tiesto, but I’m out of touch with modern EDM and electronic music. With my kids we listen to the radio and top 40 types of pop music artists like Taylor Swift and Ed Sheeran.
Best food?
I love a lot of food from outside the US with different spices and flavors, like Indian, Thai, or Mexican food. At home I like to make fresh Guacamole, pico de gallo, and get some good tortilla chips.
Best drink? Non-alcoholic or alcoholic?
I drink dark roast coffee, hot or iced, just black. For a sweet drink we drink a lot of Vernors Zero Sugar Ginger Soda.
What does your ideal weekend look like?
Since we both work during the week, and have a lot of kids activities on weeknights, on weekends we prioritize time with our kids and the occasional date nights. We take them to activities like gymnastics, swimming, or ice skating, and play dates and birthday parties with friends. My ideal weekend is usually pretty planned out to fit everything in, including some time for myself to exercise, do computer stuff like this, while also fitting in non-glamorous chores like laundry and dishes!
What’s still on your bucket list?
I love to travel domestically and internationally and have visited most states and a lot of countries! We took our first trip out of the USA with our kids this year, visiting Mexico, after nearly 10 years of no international travel. High on my travel bucket list is visiting Japan.
What is the best advice you ever got?
Invest in relationships with family and friends, surround yourself with people that care about you and lift you up. Be there for others when they need it. We all go through struggles.
When did you start using PostgreSQL, and why?
I initially used Postgres via Heroku in 2009, by deploying a Ruby on Rails app there, and learning about how to use psql and basic administration things. I didn’t use it with a production web app until working for OrderUp in 2013. The CTO was a big advocate of leveraging SQL for efficient querying, and helped show me and others how to administer the instance, like being able to terminate queries that weren’t working. I wouldn’t say I sought it out until more recently though after learning and experiencing its reputation for reliability, good documentation, performance, and features.
Do you remember which version of PostgreSQL you started with?
A PostgreSQL 8.x via Heroku in 2009 maybe, and a 9.x version when I worked at OrderUp (also via Heroku) around 2014, about 10 years ago. At this point it was mostly via the ORM though and minimal direct SQL or commands. I’d say PostgreSQL 10 was my first significant use as an administrator where I needed to really know the exact available feature set. New features that have landed since versions 11, 12, 13, etc. have been exciting for me because generally at companies or with client projects, those newer versions are in use so I can take advantage of them.
Have you studied at a university? If yes, was it related to computers? Did your study help you with your current job?
I did study at the University of Minnesota, but coming out of university, my web developer jobs didn’t have a lot to do with what I studied. The ITI degree had the coursework of a computer science “minor” as well as business classes. Looking back on my career, I’ve used the concepts in some form, although more likely the business classes like organizational behavior, accounting, or statistics. With computer science classes, I was a real newbie but learning things like UNIX (Solaris), command line text editors like emacs and nano, or using the Java and C languages and Berkeley DB (BDB). The concepts of pointers and recursion, operating systems, file descriptors, networking concepts like protocols, were things I was exposed to, which helps me have a footing on studying those topics, although I don’t work with them much in practice.
What other databases are you using? Which one is your favorite?
Professionally I’ve worked with databases popular in the Ruby on Rails community, mainly MySQL and PostgreSQL. I’ve also used Redis and Memcached quite a bit. I’ve worked with Elasticsearch heavily in a past job as well which ironically gave me an appreciation more for what’s possible with full text search in Postgres, and an appreciation for keeping things in Postgres when the data, query volume, and usages are acceptable.
On which PostgreSQL-related projects are you currently working?
I’m not working on any projects as a hacker. I’ve contributed some documentation patches though and hope to do more of that. I’m trying to learn every nook and cranny of Postgres as a user so that I can offer solutions to companies as a consultant or as a team member on teams I’m part of. I blog about Postgres as well. Sometimes that involves compiling extensions or making in-place upgrades, so I write about those more DBA things so that application developers hopefully might try those things out.
- https://andyatkinson.com/blog/2024/04/09/compiling-postgresql-macos-docs-patches
- https://andyatkinson.com/blog/2024/07/23/postgresql-extension-pg_wait_sampling
- https://andyatkinson.com/blog/2024/04/16/postgresql-17-merge-split-partitions
- https://andyatkinson.com/blog/2024/03/05/PostgreSQL-rows-removed-by-filter-part-2
How do you contribute to PostgreSQL?
Primarily I think of myself as a Postgres educator and advocate, from the perspective of high performance Postgres for web applications. A backend engineer running a software platform using Postgres, wants to leverage all the power and capabilities of it to maximize performance, reduce costs, and build great user experiences. My blogging, conference talks, and my book are all written from that perspective.
Any contributions to PostgreSQL which do not involve writing code?
Doc patches I contributed were based on reading documentation myself and finding confusing parts, then attempting to clarify those parts as a patch with a corresponding discussion. Besides that I write blog posts on my blog and have written some content for third parties. My main contribution though so far while being a commercial one, is somewhat of a labor of love in writing a PostgreSQL book showing the breadth, depth, and power of it, backing up a Ruby on Rails web application, showing loads of solutions to common challenges, and hopefully inspiring more use, and better use of Postgres by readers.
Besides writing and lecture style presentations, I also ran my first workshop focused on Postgres query planning and configuring replication. It was two hours long and it’s fully online and freely accessible including a recording on YouTube and content on GitHub. My goal with that was to inspire and educate others about what’s possible within Postgres.
- YouTube workshop recording (two hours)
- GitHub workshop README, using a Ruby on Rails app and Postgres databases installed locally and via Docker, with instructions for macOS
What is your favorite PostgreSQL extension?
Since I tend to focus most on query performance, I like any Postgres extensions that help me learn more about queries that have been executing, which ones are costly, problematic, or have optimization potential. This includes extensions like pg_stat_statements which I use to study all query groups, auto_explain to automatically capture execution plans, or pg_wait_sampling to understand wait events that are adding latency. Using the extra meta data about query groups from pg_stat_statements, I can create candidate optimizations that better use limited buffer cache or limited memory, or add query restrictions to reduce the number of rows being returned.
What is the most annoying PostgreSQL thing you can think of? And any chance to fix it?
Even though declarative table partitioning is awesome, we can’t do something like ALTER TABLE and transform a non-partitioned table into a partitioned table in place. That creates a barrier of needing to perform a row data migration, and that barrier I think is quite high for some organizations, and might prevent them from replacing a large table with a partitioned table.
Another thing might be that pg_stat_statements is not enabled by default, and thus might never become enabled or used by some installations where it could be extremely useful. There are so many useful statistics in there like execution time, temporary blocks used, or rows returned that all can lead directly back to actionable query optimization information. Besides having the extension enabled for a database though, there’s a bit of a learning curve into using it to gather insights to take action on.
Ok I’ve got one more. Big lists of values in an IN clause (or NOT IN/ANY), with a technical name of “scalar array operator expressions” as described by Lukas F in the video blog, have a fix coming for Postgres 17. The fix reduces repeated page accesses, and repeated index scans. In my experience this type of query pattern, while not optimal, is common. A Ruby on Rails application can generate queries with hundreds of values in an IN clause, which causes poor performance. While restructuring the query could be a good solution, this fix for Postgres accommodates these queries within Postgres. This fix has great potential to benefit ORM-generated queries without the app developer needing to make application code level changes.
What is the feature you like most in the latest PostgreSQL version?
In PostgreSQL 16, I like pg_stat_io which can be used to learn more about the sources of IO operations instance wide. In PostgreSQL 17, I like the table partitioning enhancements, splitting and merging table partitions. I like that declarative table partitioning continues to be enhanced in each release, making it more flexible, and helping increase the chances more organizations can adopt it.
My blog post on pg_stat_io, and splitting and merging partitions.
Adding to that, what feature/mechanism would you like to see in PostgreSQL? And why?
Something like really “cheap” updates, for use like a ticker or counter, something like HOT updates by default for a column, opting out of multiple row versions for a specific column, or making a particular column unlogged. Several developers have shared with me that they have UPDATE contention, poor performance for high volume UPDATEs where they’re updating a column that’s a counter or tallying a number, so they might remove that functionality from Postgres and choose Redis or an alternative. It would be nice to have more options here to keep those use cases in Postgres.
Should PostgreSQL have built-in multi-master replication?
Postgres has gained “Active active” replication since Postgres 16, which makes it possible to have two writable Postgres instances working together, in a very narrow fashion. There are third party solutions that combine multiple primary Postgres instances (or “nodes”) into a group, to distribute load or improve fault tolerance and reliability. I think it would be cool if both of those paths continue to receive investments. The resolution of conflicts from different primary writer instances may not be part of core Postgres though, and that may continue to be something for third party extensions or commercial providers to tackle, keeping core Postgres focused on single instance/single writer architecture.
Active Active replication in Postgres 16.
Could you describe your PostgreSQL development toolbox?
macOS, vim, psql, and macOS build tools like gcc, make etc. I work primarily with Ruby on Rails, and the Ruby programming language has a REPL called IRB. Rails developers are used to using the “rails console” which is the Ruby IRB with additional code loaded. I also like to point out that “rails dbconsole” or “rails db” launches psql when the Rails app is configured to use Postgres. Some Rails developers use psql, although in my experience most use a graphical SQL client. For that reason I wrote an appendix on psql in my book, to help Rails developers adopt psql. All SQL commands in the book are run via psql. I’ve learned a lot about psql from other Postgres community folks like Lætitia Avrot with psql-tips.org.
Which skills are a must have for a PostgreSQL developer/user?
As a user, learning to generate and read query execution plans, focusing on actionable information, and then taking action with query restructuring, schema choices and redesigns, and index design. Knowing indexing options in depth creates the opportunity to design highly targeted indexes to support the queries from an application, greatly reducing execution time and increasing performance.
Do you use any git best practices, which makes working with PostgreSQL easier?
In Rails applications, it’s common to keep a representation of the schema definition as either a Ruby formatted file or a SQL file, which is the schema only dump from pg_dump. Typically this file is checked into git, so that both incremental schema evolution changes are represented as files and committed to git, and the “output” which is a newer version of the schema definition. We discussed this topic in the Rails + Postgres postgres.fm episode here.
Which PostgreSQL conferences do you visit? Do you submit talks?
PGConf.NYC. The 2021 edition of this conference was my first time ever attending a Postgres event. I was lucky to be a presenter and it’s really what launched my career emphasis on Postgres, since that presentation caught the attention of a book publisher, which in turn prompted my career deep dive into Postgres.
PGDay Chicago. I’ve been lucky to be a presenter and attendee twice in 2023 and 2024. In 2024 I was on the talk selection committee with Claire, Karen, Sean, and Joe, which was a first for me. This was a great experience. Thanks to Henrietta for the opportunity.
POSETTE. I presented on multi-tenant architectures common in SaaS services, and designing those with Ruby on Rails and Citus.
I’m attending and presenting within the Postgres track at the PASS Data Community Summit for the first time this upcoming November 2024.
Do you think PostgreSQL has a high entry barrier?
Yeah I think the distinctions between an instance, a cluster, a database or a schema can trip up some people, being there are a lot of concepts to know. Adding extensions, while powerful, can be complex to manage locally and in production, which I think has reduced adoption. I think some of the security concepts make sense but add barriers, and users might swing far into one direction (and use superuser for everything). I like the predefined roles concepts and am seeing more mentions of predefined roles that aren’t superusers when setting up new databases.
I guess the question is really, does Postgres have a high entry barrier compared to alternatives? To answer that question I’d study other popular databases like MySQL or MongoDB, examining what’s needed to get a sensible local installation in place, that’s still secure, and maybe keep track of how many concepts are necessary to know about to get going. Maybe there are additional abstractions that could be added to help new users.
Thinking through initial questions a user would have like “how do I create a database table to store data” and thinking through all steps as friction to be eliminated. We need to install Postgres, it needs to be running, we need a database, schema, and table to store data. Third parties are exploring ways to lower the entry point barriers. Supabase recently launched postgres.new, which creates a Postgres instance in a local web browser using PGLite, and allows a user to start generating databases, tables, and filling in rows by writing natural language prompts. Some of those concepts are worth considering for how they reduce the initial barrier to entry.
What is your advice for people who want to start PostgreSQL developing - as in, contributing to the project. Where and how should they start?
Reading the mailing lists is overwhelming, but it’s a place to start to see how development happens. Reading release notes could be a good idea. Exploring extensions as a possible entry point into development, particularly for a use case you might have where you could use your own extension and provide usage information. Reading documentation and validating it in your local installation, writing up a blog post, to understand it more deeply.
Do you think PostgreSQL will be here for many years in the future?
Yes I think Postgres will be around for decades. It’s near the top for popularity among RDBMS systems per DB-Engines and Stack Overflow developer surveys. There’s no single controlling company, mitigating the rug pull risk. There’s hundreds of contributors named in each release, growing the stakeholder base. Annual releases keep things moving. No licensing fees. Performance is good and keeps improving. Complex things like query planning improvements in each release, while providing detailed planner output and observability information for users. The extensibility of Postgres is already heavily used by hundreds of extensions, but also feels like an ecosystem that is going to improve a lot from the work of motivated individuals and companies, looking to continue pushing the edges of what can be done with Postgres. It’s an amazing combination of a solid, battle-tested core with decades of credibility, plus a bright future with enhancements to the core and through extensions.
Package managers:
Would you recommend PostgreSQL for business, or for side projects?
Both.
Are you reading the -hackers mailinglist? Any other list?
Not regularly, but in certain periods I have. I’m currently subscribed but it clogs my gmail and I periodically just delete all my copies of emails knowing I can go to web versions. Ry Walker talked about an email client to help manage the email lists in an episode with Jelte. Something like that would be nice!
What is your opinion on ORMs?
Since I wrote a book on ORM usage, Active Record with Ruby on Rails, I can’t really bash them, and indeed I write a lot of ORM programming language code in Ruby, using Active Record, that generates SQL. I can see the DBA perspective where it’s sensible to write hand-crafted SQL, however query results still need to be integrated with the type system of the programming language where an application is running, so we need some kind of mapping layer to glue our persistence together with our application code.
I think most backend engineers could stand to learn more SQL, efficient schema design and data types, how to collect execution plans and create supportive indexes or otherwise lower the cost of data access. Then they’d have those superpowers to write highly efficient Rails, Django, Prisma, Laravel code, or whatever language and framework they’re using with PostgreSQL.
ORM users should add tools like sqlcommenter to help them connect problematic queries identified in Postgres, back to the application code where they were generated.
SQL versus NoSQL databases?
I have no need for NoSQL databases myself. If I wanted to store document style data I’d use a JSONB column, add some check constraints and definitions to it later once my content solidified, or even migrate it out of a less structured schema into a more structured schema design.
What other places do you hang out?
Postgres Community Slack
Which other Open Source projects are you involved or interested in?
I’ve made super minor contributions to Ruby on Rails and track the development of it, sometimes closely, reviewing the latest PRs and database related changes. For Rails/Ruby apps, I use and recommend PgHero for monitoring an instance, and pgslice for helping with the migration to partitioned tables, and have extended those a bit.
Anything else you like to add?
Besides the technology itself, many of the people in Postgres are part of why I’ve chosen to invest heavily into it for my career. Very busy and active contributors, community advocates, and event organizers like David Rowley, Stephen Frost, Jonathan Katz, Robert Treat, Melanie Plageman have all been part of my journey, being kind, patient, and helpful with me and being great ambassadors for the open source project and community. Many of these people are available to meet in person at community events, which are great opportunities to form or strengthen connections.
Andrew Atkinson is the author of “High Performance PostgreSQL for Rails,” a 450 page book published in July 2024 by the Pragmatic Bookshelf, now available from all book retailers. A #1 best seller in the Ruby Programming category on Amazon.com, and a multi-week best seller on pragprog.com, this book helps backend web application developers learn to maximize the performance, reliability, and maintainability of their PostgreSQL database operations.
Share: