Samay Sharma

Reading time: 8 minutes

Tags:   postgresql (175)   microsoft (7)   community (25)  
Category:   interviews   
Written by: Andreas Scherbaum

Please tell us about yourself, and where you are from.

I’m Samay Sharma and I live in San Jose, USA with my wife and my toddler girl. I was born in India and did my university education from IIIT-Hyderabad, India. Today, I work at Microsoft and manage our open source Postgres team. It’s a great opportunity for me to work with PostgreSQL and learn from the knowledge and expertise of different committers and contributors.

Samay Sharma

Samay Sharma

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

I like to spend time with my family and friends. I’m a curious person and I spend much more time than I should learning about random things on YouTube. I also like watching Indian movies, and playing badminton.

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

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

I’ve read “The Effective Executive” by Peter F Drucker a couple times and it’s a book I recommend. It describes how to think like a leader, how to get better at managing time and prioritization, and making effective decisions. It’s a book I keep going back to, to read my notes and re-read certain sections.

Any favorite movie, or show?

Too many! I like Sci-fi shows and movies and a recent show I liked was Dark on Netflix.

What is the best advice you ever got?

Having a growth mindset. It’s always good to go into every conversation whether written or verbal with an attitude to listen and learn. I’ve learnt a lot by just being curious and asking stupid questions.

When did you start using PostgreSQL, and why?

I started using PostgreSQL when I did an internship with a company named Citus Data (now part of Microsoft) in 2012. My first project with PostgreSQL was writing up the first version of mongo_fdw. I was super impressed that PostgreSQL provided an opportunity to query data stored in other databases (even NoSQL ones) using SQL.

Do you remember which version of PostgreSQL you started with?

It was PostgreSQL 9.2.

Yes, I studied Computer Science at IIIT-Hyderabad in India. I do think studying CS at university and knowing the basic concepts of things like operating systems, networking and databases helps me in my current job. It helps me grasp concepts and understand the architecture of systems better. However, I’m sure there are other ways to acquire that knowledge.

I also learnt quite a bit in terms of soft skills and people skills from university as I was a pretty active member of several communities.

Recently, I worked on writing up docs for building PostgreSQL with Meson. There’s still a bunch of follow up work on that which I’m doing.

I’m also thinking about how we can make it easier for new developers to contribute to PostgreSQL. I manage the PostgreSQL open source team at Microsoft and we have a mix of committers, senior PostgreSQL developers and folks who are new to the project too. Learning about the challenges they face and how we can improve as a community to make them successful is an area I’d like to do more on.

How do you contribute to PostgreSQL?

I’ve been associated with PostgreSQL for a decade and have done many different roles. I worked on developing the Citus, mongo_fdw and cstore_fdw extensions. I, then, worked in a customer facing solutions engineer and architect role for about 7 years working closely with customers helping them make the most out of their PostgreSQL setup. This included set up, performance optimization, configuration tuning, upgrades etc. I’ve written a few blogs and given talks based on my learnings working with customers.

Since last year, my focus has been on making contributions to PostgreSQL more directly.

Any contributions to PostgreSQL which do not involve writing code?

I’ve written and reviewed docs, authored a few blogs and given talks about PostgreSQL at different developer conferences.

What is your favorite PostgreSQL extension?

The extension I most recommend people to use is pg_stat_statements. It gives you much needed visibility and helps you isolate performance related issues faster.

I’m biased but I also feel what Citus has been able to do (create a distributed database based on PostgreSQL without forking it) is very impressive and a testament to PostgreSQL’s extensibility.

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

I think it’s pretty hard for new developers to become regular contributors to PostgreSQL. There are a number of things we can do to improve this across different domains like contribution processes, developer documentation and getting started guides, CI improvements, making it easier and quicker to build and review patches etc.

I’m actively thinking about this and plan to make contributions to improve this.

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

I was impressed by the logical replication improvements adding support for row filtering and specific column lists. It can help expand the use cases for logical replication pretty significantly.

Another change in PG 15 I’d like to mention is the elimination of stats collector and storing of stats in shared memory. This should allow us to add many more stats to PostgreSQL in upcoming releases and make it easier to monitor.

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

I think PostgreSQL should be easier to manage and monitor. Oftentimes, it’s pretty hard to find out what the problem is and how to debug and fix it. Depending on the issue, it could require enabling more logging or setting some configs, restarting the database, querying and making sense of data from a few catalog tables and then searching the internet for how to address it. Exposing more actionable stats is something I’d like to see more of.

Could you describe your PostgreSQL development toolbox?

I use vim (+cscope) to do Postgres development on my Mac.

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

I think as a user: SQL and ability to monitor postgres is a must have skill.

As a developer, a good understanding of C and database internals comes in very handy. In terms of non-technical skills, I think persistence is a very important attribute to be a regular PostgreSQL contributor :).

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

I’ve visited PGConf SV, PGConf.NYC and Citus Con: An event for PostgreSQL (virtually) in the past. I’ve also attended and given PostgreSQL related talks at developer conferences like RailsConf, Microsoft Build and others.

Do you think PostgreSQL has a high entry barrier?

As a user - not really. It’s popular enough at this point that you can find answers to common questions soon. Also, if you’d like to run Postgres, pretty much all major cloud providers and other companies provide managed services around it, so you can quickly get access to a running postgres. A few things which would reduce the entry barrier further is a slick UI tool and easier monitoring and visibility.

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

There’s multiple ways to contribute to the project but it can often be hard to figure out where to start and how to make progress.

For contributing to the code, the easiest way to start is to work on fixing or addressing an issue you’ve run into yourself - it may be a missing feature, a bug-fix or a documentation improvement. Discuss and read previous threads on that topic on pgsql-hackers and then submit a patch for discussion.

It’s often hard to find what to work on or what’s actively going on for someone new. For that, you can look at the commitfest website to see what patches are submitted and need review. Reviewing is often a good way to ramp up on a section of the codebase. Even if you don’t know much about that part of the codebase: testing the patches, commenting on the docs or sharing your opinions about the user interface are all useful things to do.

You can also look at cfbot to see which patches have tests failing and try to figure out the reason for that. You can then submit fixes to those issues.

These are all some ways to begin contributing to the project. I know it can often be daunting, but just find ways to get started and do small things and slowly build your way towards bigger tasks and projects.

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

Yes, I think PostgreSQL will be around for many years to come. Its popularity has been growing immensely and seeing the improvements made to it every release so closely, the potential is huge.

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

For both. I think it’s good advice that one should start with Postgres for any database needs unless they find a specific reason why they should not.

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

Yes, I read the -hackers and the -general mailinglists regularly.

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

Most open source projects I’m involved or interested in are PostgreSQL related i.e. extensions.

Anything else you like to add?

I feel that in general, the PostgreSQL community is very welcoming and most people I’ve met here are helpful. I’m always impressed with the progress we are able to make as a project with a completely decentralized, community based, consensus process. There’s a lot I’ve learnt being a part of this community and I look forward to contributing to it more and making it easier for more and more people to get involved in the project.