Louise Grandjonc



Tags:   postgresql    django    python    orm    query    indexes    optimisation   
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 Louise, I come from France and recently moved to Vancouver (Canada, not Washington, I was not aware there was another Vancouver before announcing I was moving, and several US people asked) to work at Crunchy Data as a senior software engineer.

Louise Grandjonc

Louise Grandjonc

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

I like cooking, climbing, hiking, reading, playing music, and watching a good movie or show.

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

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

The last book I read was about the roman empire. It was written by a historian as a story following a coin across the empire. Very interesting and surprisingly fun.

But my favourite book that I own 7 copies of, including one in Russian (and I don’t even speak Russian), is the Master and Margarita written by Mikail Bulgakov. It’s the story of the devil and his acolytes arriving in Moscow in the 1930s.

Any favorite movie, or show?

Favorite movie: Stalker - Andrei Tarkovsky, a russian science fiction movie about a man guiding people through a forbidden zone where mysterious things happen . For some reason, I love Russian art in all of its forms.

Favorite show: I guess Buffy the Vampire Slayer, more specifically the musical episode that I watch every time I’m in a bad mood and know all the lyrics of.

What does your ideal weekend look like?

Go for a hike somewhere without mosquitoes.

What is the best advice you ever got?

“If your endpoint needs more than 30 queries, you’re doing it wrong”

When did you start using PostgreSQL, and why?

I had databases courses during university. But I would say that the first time I really used it and was made aware of the importance of performance was while working at Ulule and PeopleDoc. I had colleagues that were pretty strict on using ORMs wisely, and a good friend and former colleague, Rodolphe Quiedeville, took me to Postgres Meetups. It was love at first “hearing-someone-talk-about-things-I-didn’t-understand-at-the-time”.

Do you remember which version of PostgreSQL you started with?

No idea… Probably 9.3 according to the release documentation.

I have a master’s degree in computer sciences. It somewhat helped, I remember enjoying our databases courses at the time (even if they were at 8am on Fridays, which shows a lot of interest in the subject), but I think it’s more design patterns and algorithm complexities that I still use. It’s also hard to weigh what I learned from university and what I learned from experience.

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

I have several notebooks where I write ideas, projects and strangely often algorithms before implementing them. It’s very poorly indexed.

I am working on Crunchy Bridge, a multi-platform (azure, aws, gcp) postgresql as a service. I am more specifically focused on availability, backups and any related subjects.

How do you contribute to PostgreSQL?

I don’t contribute code-wise to PostgreSQL itself, however I think I contribute to the ecosystem, especially while working on a fully managed Postgres service helping developers to adopt it.

Any contributions to PostgreSQL which do not involve writing code?

Talking at conferences, I haven’t done it in a while, and am looking forward to doing it again. I have also been in the selection committee of several conferences and love it.

What is your favorite PostgreSQL extension?

I think pg_stat_statements is the one I push people to use the most. It’s really showing weaknesses in a system. A lot of complex applications are using ORMs, which I am not against. The object mapping side of the ORM is not something that we, developers, can work without. But I am aware of the side effects of it, and seeing some really troubling queries, or queries being executed more than they should.

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

Well… I would say that we don’t have a diverse community. And it feels like now is the moment to think about it, and have a conversation. A lot has been done in my time in the community, like having a code of conduct, and its committee. But improving ourselves is a never ending process.

It’s something that is important to remember, especially when selecting talks for conferences. It’s easy to end up doing a safe choice, with speakers that we know are experts and good at public speaking. But we need to be more open, and take some risks. Whenever you welcome a new speaker, you take a chance of growing the community.

And on the subject of opening the community, I think that we are lacking some good documentation and ways to welcome new developers to contribute to postgres. I know many people will disagree, but to me we are lacking a proper tutorial around this. I really love the work django did on that and it pushed me to contribute.

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

That’s a tough one! Lots of improvements on indexes in the past couple versions. And the new-ish (PostgreSQL 12) feature I use a lot in INCLUDE in CREATE INDEX, allowing you to add columns that you don’t need in your tree to indexes.

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

I would like to see improvements in statistics and detection of multi-column stats. A good example is city and country. If you have a query with filters on both those columns, postgres will assume that the two filters are removing rows, while us, as humans, recognize that those two columns have a link. We can use CREATE STATISTICS for this type of behaviour, but it would be nice to have it somehow automated.

Could you describe your PostgreSQL development toolbox?

I use emacs as an editor, and my local Postgres, I usually log everything, as explained here: just because I want to check what’s happening on my database side and it’s the easiest way I found, especially as I work with python, ruby, and crystal.

For ORMs, I grew very fond of Sequel, a ruby ORM as it supports all the nice fun features from postgres, even lateral joins and grouping sets. I gave a talk about different ORMs for python and ruby, and on the latest it’s definitely the best one.

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

I can’t think of anything you must have, probably every single of the skills that you would need can be learned while doing it. Though I guess to contribute to PostgreSQL you might need to have written like, a couple lines of code in your life.

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

Using logs, pg_stat_statements and being careful about working with a local/staging dataset big enough to avoid bad surprises when releasing on prod.

Also if you’ve never really opened the box and looked behind your ORM, do it, it’s actually a lot of fun. To me it’s kind of like a logic game, and you’ll see improvements so fast in your apps and learn so much, you will love it.

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

I’ve spoken twice at PGConf.EU and at some pgdays, PostgresOpen and meetups.

Do you think Postgres has a high entry barrier?

As I said earlier, I think that the main reason it’s difficult to contribute to PostgreSQL is the lack of documentation and tutorials. The code base itself is very clean and has very helpful comments. I haven’t contributed yet, but read in a lot of details the code related to indexes to prepare for a conference. I was asking people questions, and as they didn’t have the answers I was hoping to get, I just went and read the code. It was a growing experience that I recommend.

Again, I would encourage anyone who is passionate about inviting new developers to take a look at what the Django project has done.

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

Yes, it’s the best database. It’s the most advanced open source database in terms of standard SQL and to me the community is one of the keys of PostgreSQL. It created a dynamic and each new release brings incredible new features. I also think that the fact that companies invest in its evolution, hire Postgres developers is a good sign for the future.

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

Both. I generally think that it is a great database, I know that I personally love exploring the SQL language, and am always amazed by what can be done with postgres. I remember when I started using LATERAL JOIN and then forgot how I did it before. And if a database is great, I don’t see why I would use it for one scenario and not for the other. Except if I don’t need a database, in which case I would not use postgres.

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

I should read it.

What other places do you hang out?

I hang out on discord, but don’t even know if we have a PostgreSQL discord server.

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

Lately I haven’t taken the time to contribute to Open Source projects. It’s been pretty intense to build Crunchy Bridge, and in my spare time, I try to escape screens. I want to find the time to contribute to Django again, because I think that some of my PostgreSQL knowledge can be valuable there.