Skip navigation

My Postgres partitioning cookbook

Derk van Veen

Derk van Veen Derk van Veen

(Livestream 4)

Over the last three years, I have tried every single thing I could think of with Postgres partitions, and I made many mistakes. Most of them on my laptop; some lessons were a bit more painful. I've seen my fair share of performance problems and converted inheritance-based partitions to native and back. I've created many default partitions and by now managed to almost drop all of them.

In this session, I want to go over all my lessons learned, especially the ones that surprised me the most. I will cover the basics about index and foreign key creations and implicit inheritance. And how the foreign keys caused catalog corruptions because of cleaning up data. I will discuss the good, the bad, and the ugly of the default partition and leave it to you to judge them as a blessing or a curse. An important part of working with Postgres partitions is cheating with the catalog. When I proposed this to my team the first time, everybody was nervous about it, as they should have been, but these days we do it without thinking. It is bad practice, but sometimes it is just the only way to get things done.

This presentation will show you the basics, but also shows the pitfalls (mines) and obvious mistakes you can easily avoid.

talk bubbles
Join the conversation

Use the hashtag #PosetteConf