Skip navigation
Chris Ellis

Chris Ellis

Nexteam

Chris is a computing and electronics geek, who loves working with Open Source software. He is a jack of all trades consultant usually spending his time engineering systems with PostgreSQL, Java and Linux. Now and then he gets time to design some electronics often involving ESP32s, Raspberry Pi CM4s and LED badges.

POSETTE 2025 Talk

Fun With UUIDs

(Livestream 3)

UUIDs have a bad reputation, mostly based on randomly allocated UUIDs effect on indexes. But UUIDs also give us 16 bytes of space to play with, which can be to our advantage. We can use the space of UUIDs to structure and encode data into our identifiers. This can be really useful for multi-tenant applications, for sharding or paritioning. UUIDs can also help improve you web app security, by not leaking sequentially allocated ids.

We'll take a look at index performance concerns with randomly allocated UUIDs, sequential ids and sensibly structured UUIDs.

Seeing how we can go about extracting information from these UUIDs and how to build these UUIDs inside PostgreSQL, and how we can look at the performance of these functions.

Finally looking at adding support for bitwise operations on UUIDs using an extension.

Add livestream to calendar Register (optional)

Speaker Interview

About the Speaker

  • Tell us about yourself: career, family, passions

    So, I’m Chris, I grew up near Wolverhampton on the Shropshire border, not too far from The Iron Bridge. These days I have been living in London for the last few years. Running Nexteam, a technology company along with some friends.

    I’m a computing jack of all trades, master of none, but often better than a master of one.

    My knowledge and skills go properly full stack from hardware to front end. PostgreSQL, Devops, Java are my strongest areas, but I’m just as comfortable fiddling with Ceph clusters, networking and web frontends.

    I often find the problem I’m solving more interesting than the specific technology I’m using, as long as it’s Open Source.

  • What is your icebreaker for PostgreSQL events?

    Something I'm slowly getting better at, it's a lot easier now I'm better known and I know a wide number of people in the community. I often end up talking to people about a talk that's just happened as an easy way into a conversation. My LED badges often end up starting conversations too.

  • How do you prepare for an online presentation?

    This is my second time presenting at POSETTE and I must admit the team last year did an amazing job in making it less stressful than at other online events. I wasn't looking forward to recording it last year, but by having a defined slot to record and a small audience, it really helped. It made it feel much more live walking on stage at an event, where you kind of mentally switch mode, I find for me that is really important.

  • Which book are you reading right now?

    I'm a slow reader, and only just finished reading 'Slide Rule', an autobiography of Nevil Shute, he was an aeronautical engineer in the early days of aviation. I really should try to dedicate more time to reading something, but last year had a few ups and downs. I've just started reading 'A Mind at Play' a biography of Claude Shannon, who essentially established Information theory, something which underpins our daily lives.

  • What is your favorite hobby?

    I spend a fair amount of my time building things, a bit of a random selection of electronic things like my Electric Elephants. Otherwise, I might be listening to some Vinyl on my Hifi, or in the pub with friends. During the summer you'll often find me enjoying the slow pace of a County Cricket match down at The Oval.

About the Talk

  • Tell us about your talk? Why did you choose this topic?

    The seed for the talk came from our December PostgreSQL London meetup group social. We were chatting about UUIDs, and someone expressed strong negative opinions about using them. I explained how I use them and why I find them useful. That kind of changed their mind. To which someone else accused me of thinking like an embedded engineer, which I don't take as a bad thing.

    So, I figured it would be an interesting lightning talk when PGDay FOSDEM announced they were doing some.

  • Who would benefit the most from your talk and why?

    The talk is mainly aimed at application developers, it'll provide some ideas about how to make use of UUIDs, their pros and cons. Along with revealing some PostgreSQL internals in showing what you need to be careful of and think about.

  • What are you looking forward to, the most, during your talk?

    It'll be interesting to develop what started as a 5-minute talk into a longer form talk. Especially for something on the surface, it is just a talk about a data type. That almost sounds kind of dull, but it gives a starting point to take, develop from and expand around.

  • What existing knowledge should an attendee have?

    A basic understanding of PostgreSQL and SQL fundamentals should be enough. We'll start simple and build from there.

  • Which other talk at this year’s conference would you like to watch and why?

    I'm intrigued to listen to: Postgres Storytelling: Cunning Schema Design with Creative Data Modeling. Boriss always finds very interesting and creative ways to tell stories in talks, so I'm excited to see what he and Sarah come up with.

  • How do you balance technical depth with engaging storytelling in your conference presentations?

    I think storytelling is often more important than the technical content. People rarely remember a rambling overly technical talk. To be able to explain something technical to a wide audience requires the talk to be well structured. I often find how to structure the talk takes the most effort.

About PostgreSQL

  • What inspired you to work with PostgreSQL?

    People should listen to my Path To Citus Con episode for more. It was a mix of things which started me going down the rabbit hole, but mainly working on a full text search project back around 2008. I will say I've not yet found the White Knight, or Red Queen, but remember what the dormouse said: Feed your head.

  • What is your favorite PostgreSQL feature?

    The Community! I find the PostgreSQL community to be friendly and helpful. I think the fact PostgreSQL is an actual project, with multiple competitors collaborating together to be hugely understated but very important.

    PostgreSQL has so many cool technical features and my favorite tends to change project by project. Its extensibility is probably my favorite technical feature, but I see that as something which has happened due to it being a community led project.

  • What is the single thing that you think differentiates PostgreSQL most from other databases?

    I think the core thing which PostgreSQL got right (very early on) was the plugability of data types and functions. It's this extensibility and approach that I think has differentiated it significantly from not only FLOSS competitors but proprietary competitors. This capability coupled with the community has enabled rapid innovation at times. It's also what will ensure our longevity.

  • What is your favorite PostgreSQL extension or tool? And why?

    PostGIS. I've used a fair array of extensions over the years, but PostGIS has definitely been the most common. Even if I don't always use it very much. It's got such an immense amount of power and can make doing some very complicated things really easy.

  • What advice would you give to someone starting their journey with PostgreSQL?

    Stay curious and keep on playing, I think you learn by doing, so keep on practicing. You get good by trying things, making mistakes and learning from them. Read the manual, try something, if it goes wrong come and ask for help. Don't just stay in your comfort zone, there are always many ways to solve problems.

  • What are your favorite resources for learning about PostgreSQL?

    Planet Postgres is great for finding out about new features, for learning about how others are approaching things.

    The PostgreSQL docs are a very underrated resource; they are very comprehensive.

    I'd add going to a conference is a great way to discover other ideas and to chat with other people about their ways of doing things and experiences.

  • Could you share a memorable experience or challenge you faced while working with PostgreSQL?

    There have been so many over the years. A very rewarding project for me was working on a Smart Energy Analytics platform that had PostgreSQL at its heart. The data volumes only ever grew and the logic only ever got more complex. It was a constant learning of new features to use to solve problems, different performance issues to dig into and try to tune.

    Probably the most fun single project was building a real-time election map, back in the era of IE6. PostgreSQL and PostGIS really enabled us to push the boundaries of what was possible back then. The company's core mapping system was junk compared to what we managed to pull off with open source tools and a bit of passion. We ended up in one evening pushing the same amount of bandwidth as the website did in a whole year. Plus being in the count hall inputting data was pretty cool.

  • In your opinion, what are the most common pitfalls or mistakes developers make when working with PostgreSQL?

    Viewing the database only from the eyes of their ORM. TBH I dislike ORMs, my view is probably still tainted from using Hibernate before Java annotations, that was such an awful experience our whole team vowed never to touch it again. I'm pragmatic enough to say, this doesn't mean never use an ORM. Just use one that still lets you write actual SQL when you need to. I really don't want to read yet another nested loop join in application code, please.

    The other thing I commonly find and really annoys me, is: VARCHAR(255). This is a great way to show that you've paid zero attention to what you're doing. I don't think I've come across an actual use case where the max string length is actually 255 and most people have just cargo-culted this from MySQL or other developers. Just use TEXT and add a CHECK constraint if you need it.

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

    Curiosity. That desire to go and learn how to get the most out of PostgreSQL.

    You don't become a Violin virtuoso without thousands of hours of practice. Learning PostgreSQL (or anything else) is the same. There are no shortcuts at getting good at something. So I often think the most important thing is to find working with PostgreSQL interesting, or at least the problems you are solving with it.

  • What is the most overlooked thing about PostgreSQL?

    Hmm, probably the fact it just works, in so many cases. I think it's really easy to only hear about the problems or the tricky cases. But for every person that runs into an issue with wrap-around or performance, etc, there are thousands of perfectly fine running systems, probably getting little maintenance or attention.

    Plus just how powerful PostgreSQL is at solving problems, SQL is a great language for solving lots of data problems with ease. PostgreSQL has really good support for the standard and lots of nice extensions that I find really help you solve application problems easily.

  • PostgreSQL is open source, did that ever help you in anyway and how?

    One significant fun moment comes to mind, we had a rather complex bill processing stored function. We left it running over the weekend, in the office on Monday it still hadn't finished, CPU sat at 100%, very little disk IO, all a bit fishy. Used strace, very little syscalls happening, attached GDB, hmm spending a lot of time in SMgr unreeling a singly linked list or unowned relations. Our job had effectively been creating a new temp table inside the loop, we had around 6 million temp table files on disk.

    I looked up the code to find a comment: 'In the worst case this could be rather slow; but in all the cases which seem likely to be performance-critical…'. Essentially we'd triggered an edge case no one thought would be common. The fix for our function was pretty trivial and over the years this handling in PostgreSQL looks to have changed a fair bit.

    But it was definitely a time that being able to read the code really helped identify and fix a problem quickly.

  • If you had a magic wand, what single thing would you change in PostgreSQL as it is today?

    My views on this seem contentious, and I know it's not easy and would require a lot of work, but I think it's important for PostgreSQL to try and tackle it at some point.

    That would be being able to support cross major version streaming replication.

    I often find upgrades are still a lot of people's big headaches, pg_upgrade is cool and good for lots of situations.

    I think we need to spend the time trying to evolve our storage format to support backwards compatibility. So that upgrades could just become install the new binaries and start up, or connect the next version as a streaming replica. I'd also go as far to say supporting cross CPU / OS architecture replication as part of it.

About POSETTE & Events

  • What motivated you to speak at this year’s POSETTE: An Event for Postgres?

    Well, Claire and Teresa have to take a lot of credit for keeping reminding me to submit some abstracts. Plus the random conversation at a PostgreSQL meetup which was the seed for the original lightning talk in the first place.

  • What other PostgreSQL events in 2025 are you excited about and why?

    I'm really looking forward to pgConf EU 2025 and pgDay UK 2025, mostly because I'm helping organise both again. I'm also really excited by pgDay Lowlands 2025, the team behind that are innovative and do a great job.

    I'm excited for pgConf DE 2025, which I'm speaking at, with the same talk but even longer.

  • What advice would you give to fellow speakers preparing for a PostgreSQL conference?

    Prepare and practice, especially if you struggle with confidence as a public speaker. It really does get easier as you do it more. But it still easily takes me a few weeks of effort to write and practice a talk.

  • What would be helpful to know for a first-time speaker?

    Firstly, just go for it! Secondly, keep trying.

    Try to start out by giving a small talk at a local meet up, or maybe to your team at work. Take part in a lightning talk session, more conferences are now arranging these in advance now (which I think is really good). Lightning talks are great to boost your confidence, being shorter you can practice them way more in less time, they don't take zero effort and will teach you a lot.

    Next, you'll get rejected lots and lots of times before you get accepted. Talk abstracts don't get chosen for lots of reasons, Claire's blog was a great explainer on the process most conferences use, and why you might not get chosen. So keep submitting talks you think are good ideas and submit some variations or other ideas.

    Abstracts cost nothing, it's not like you have to have written the talk!

  • Could you share a memorable moment from a previous PostgreSQL conference you attended or spoke at?

    Getting the feedback: 'made a boring topic even more dull' is still pretty memorable and definitely pushed me to improve.

    On the positive side, I still vividly remember the first talk I ever saw at a PostgreSQL conference, back at PGConf EU 2010 in Stuttgart, Gianni Ciolli talking about building a Chess bot with PostgreSQL stored functions. It was a fun way to talk through the power and capability of functions plus all the stats tracking you get for free to help you optimize your code.

Past Talks

Podcast Appearances

talk bubbles
Join the conversation

Use the hashtag #PosetteConf