Julian Markwort

Reading time: 12 minutes

Tags:   postgresql (170)   student (2)   high-availability (6)   patroni (6)   ansible (5)   consulting (5)  
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 Julian Markwort, and I live in Gießen, Germany. My main job is studying for my Master’s degree; Besides that, I am the following, in the order of time spent:

  • Dad
  • DBA
  • Consultant
  • Developer

I’m planning on finishing my Master’s thesis this year.

Julian Markwort

Julian Markwort

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

If I have any free time left after having fulfilled all my other roles, I like to fix things. Fixing computers sort of comes naturally, but I also try to fix any issues with my espresso machine, bicycle, and car, among other things. A few weeks ago I disassembled, cleaned and rebuilt my bike’s internal gear hub. A while ago I replaced a broken solenoid valve in my espresso machine and completely disassembled and descaled everything - as in every single bolt and pipe. It fills me with joy and satisfaction to be able to do these things on my own, only relying on diagrams, forum threads and sometimes youtube videos. It’s always stressful - the more I pull things apart, the more I question if I’ve made a terrible mistake and how it will ever work again. But in the end I usually succeed and am quite grateful that I don’t have to rely on any “experts” to fix my stuff and overcharge me. This summer I’ll need to do an engine oil change, transmission oil flush, replace the thermostat and belts in my car. And the park distance control also needs fixing.

In this way, my hobby is quite similar to my job, where I often have to fix things I know very little about, and while I also encounter these moments of doubt in my job, I am usually able to pull it off.

Any favorite movie, or show?

I.T. Crowd, Norsemen, Der Tatortreiniger first come to mind. I like funny things. Also, I can find a quote from Shrek (1-3) for any situation in life.

I also hugely enjoy videos with a focus on engineering, or cars, or both on Youtube, I’d recommend to check some of these channels, if that interests you: AvE, This Old Tony, Marco Reps, Bad Obsession Motorsport, Vice Grip Garage, Junkyard Digs, M539 Restorations (coincidentally, another person with an I.T. background and a knack for wrenching…).

But don’t come complaining to me if you end up spending too much time watching those!

What does your ideal weekend look like?

The ‘ideal’ weekend would begin with me sleeping in… I’d then have all the time in the world to make a cappuccino - and drink it in peace. After a decent breakfast, I’d go on an extended bike ride with my family. The evening would ideally be spent with some good friends, almost falling from the couch from laughter about funny youtube videos or a really trashy movie.

What’s still on your bucket list?

One day I’ll buy a broken old car and try to fix it up to be driven again, or possibly convert it to an electric motor. But I think german technical inspection would make that nearly impossible. I might have to go to a more liberal country to do that. The bigger challenge is to decide on the car to fix… Maybe a Mercedes W123 or W201? Maybe a T4 bus?

What is the best advice you ever got?

“Perfect is the enemy of good”. Which is also the advice that I ignore most often. I think it is very important to know when it is good to spend more time, bringing something close to perfection (there is never a perfect state - let’s be honest), and when it’s sufficient to only get things working and leave it be.

When did you start using PostgreSQL, and why?

I started using PostgreSQL at a student job at my university, while I was still studying for my bachelor’s degree. I was never really deeply involved in anything happening at the frontend - where the all-important SQL part comes into play - but almost straight from the beginning I started hacking at the backend.

At the time, I complained to my superior that all my tasks at university involved boring Java stuff, and all my tasks at the student job involved boring PHP stuff. And that I’d much rather be coding in C again. So he suggested that I take a look at some patches in the ongoing commitfest, and then he asked me to write a small patch that enables users to specify the .pgpass file directly, instead of having to rely on it being in the user’s home directory.

A while later, my superior suggested that I try to make pg_stat_statements track execution plans as well. It took me quite a while to understand how most of the things in pg_stat_statements work, and in the process I may have created several bugs that lead to segmentation faults, while executing queries or while shutting down the server process. But despite not having anyone on hand with in-depth knowledge of the database internals, I was able to debug and fix all issues. I had some help from my colleagues at the time as well, but mostly in the form of rubber duck debugging, since they didn’t know much about C.

While I’m currently not working much on the server itself, or even programming at all, I am still quite fond of doing that. The prospect of having lots of time to spend on making your code nice and shiny is in some ways much more appealing to me than consultancy work.

Do you remember which version of PostgreSQL you started with?

I think I started hacking the aforementioned patch for pg_stat_statements together for version 9.3, since that was used in production at the time. I quickly had to try and rebase everything to 9.4 and then 9.5, where (I think) a very big change came to the structuring of pg_stat_statements, which led me to rewrite almost all of my patch. Unfortunately, that patch was never merged into master, but if anybody is interested in this (at least to the extent of telling me “That’s something that would be really useful”) I can give it another try.

I’ve acquired my Bachelor’s degree in computer science in Münster, Germany, and am still pursuing my Master’s degree there. At some point I was under the impression that I knew a lot of theoretical concepts, but had hardly any practical experience. Thankfully my student jobs quickly turned this around and I now feel like I have an equal amount of theoretical and practical knowledge. I frequently am reminded of concepts I learnt at university, high-level or low level, theoretical or practical, and I apply them in my everyday work and thinking. Of course, not everything taught at university will be useful later in one’s life, nor does university fully prepare you for a real job, but it is a really good way to spend your time learning as broadly or deeply as you like.

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

I’ve never had to deal with any other databases in depth, and honestly, I prefer for it to stay that way.

Since I mostly work with Patroni clusters (Automated PostgreSQL clusters using streaming replication) these days and since the issue of “how do we make component X highly available” (where X is something in between the applications and the database) comes up quite frequently and nobody likes to deal with keepalived or pacemaker, I am hacking on a tool that can automatically register and deregister virtual IP addresses based on a quorum-backed decision in etcd or consul Distributed Consensus Stores (DCS).

Let’s say you have two HAProxy and one virtual IP address. If either HAProxy is healthy, only one of them may have the address; If one fails, the address of course needs to go to the remaining healthy node.

But this tool could work with many more addresses, e.g. you might have several IP addresses in a DNS record for round robin load balancing. Similarly you could have as many HAProxy (or pgbouncer, or something else entirely) as you think you’ll need and the tool would take care of scaling the number of locally registered IPs up or down, depending on the ratio of healthy components to the number of total addresses.

If this sounds interesting to you, you can check it out on GitHub.

How do you contribute to PostgreSQL?

Too infrequently, unfortunately.

Any contributions to PostgreSQL which do not involve writing code?

Since I don’t really have time or ideas to work on cool features or fix bugs in the “core” at the moment, I try to have a positive influence on other levels. For example, I’ve given a talk about Patroni at pgConf.de 2019, I’ve talked about using Ansible to automate and speed up DBA tasks at the Postgres Users Group Frankfurt and I’m volunteering at different events that PostgreSQL europe organizes. Sometimes I try to help people understand or fix things in the PostgreSQL Telegram and Slack channels, or on StackOverflow.

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

That there is no way to easily check the validity of a password other than setting up a custom pg_hba entry. Let’s say you have already opened up local sockets using peer authentication, and everything else is only allowed in via a load balancer’s IP address using scram-sha-256 authentication. In that case, the only way to “test” a password is to go through the load balancer. Even passing -W to psql (to make it prompt for a password) when connecting via a peer-trusted socket locally, always logs you in, even if you provide a wrong password.

What is the feature you’re mostly looking forward to in the next PostgreSQL version?

There will be an exciting addition to PostgreSQL 14: “Hybrid Hash/Nested Loop joins”, which essentially uses a cache to speed up nested loop joins where the inner loop regularly encounters the same entries that were encountered in the last iteration of the outer loop.

This can greatly speed up nested-loop joins where one table is too big to be used in a “plain” hash join and the other one is small enough to be easily cached. It should also speed up any subselects or similar constructs where the data (in the subselect) does not change between iterations of the outer loop.

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

Dealing with Patroni clusters regularly sometimes makes me think that it would be great to be able to demote cluster members “online” - currently the only option is to stop the database and restart it in hot standby mode. But this is a task where it is already difficult to imagine how it would work, and probably pretty much impossible to add it to the database itself.

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

There was a scene in Game of Thrones, where Samwell Tarly carries out a medical operation which no one, even his mentor, deemed possible. Astonished by his success, the mentor asks him how he achieved it, to which Samwell replies “I read the books and followed the instructions”. This may be applicable in any field, but when talking about the PostgreSQL documentation it is especially true. There are so many corner cases, examples, common pitfalls, suggestions and many more hidden - or rather: well documented - in the official documentation, that an extensive reading of the same should be the first point on any user’s bucket list while troubleshooting.

Do you think PostgreSQL has a high entry barrier?

The entry barrier is no higher than anything comparable. Packages are available on and for all major linux distributions and starting a database locally for some experimenting is really easy. Like with everything, running a database for more important setups can be a challenge, but there is no point at which the learning curve becomes a cliff that you need to climb. Putting one step after another can bring you very far in PostgreSQL.

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

Try and fix what you find most annoying, or at least what somebody else finds very annoying. It’s difficult to continue finding motivation for nice to haves, but if you absolutely need something or are really fed up with current options, chances are better that you’ll succeed with your contribution. Maybe your first contribution is better documentation of how the build system works, after you’ve been struggling for a while, even getting a “vanilla” build going…

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

PostgreSQL’s roots are already older than I am, so it seems likely that we’ll be able to continue developing and using postgresql for a good while.

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

For sure! I’ve used PostgreSQL for a small weather station or for analyzing transfers to and from my bank account. But I regularly deal with customers running much more elaborate applications on top of the very same database management system, with great success.

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

I’m terribly bad at subscribing to anything. Either I feel the pressure to read everything or I end up ignoring it all. I hope that changes (at least for the -hackers mailing list in particular) when I’m done with my Master’s thesis. But for now at least I’m subscribed to the -announce list.

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

I use patroni and ansible quite a bit during my working hours. I am convinced that Open Source software is always the best choice. I run linux on all my computers, use darktable to develop photos. I stream music and movies via subscription services, but at least I can do all of that on linux using SlimServer or Firefox.

Anything else you like to add?

So long, and thanks for all the fish!