Skip navigation
Adam Wolk

Adam Wolk

Principal PM for Postgres @ Microsoft

OpenBSD developer interested in database engineering, distributed systems, information security & networking. Over a decade of experience with large and complex systems ranging from the corporate financial sector to the start-up landscape. Experienced team leader developed systems from the ground up from C on ARM devices, through back-end systems in Go, Python and Rails to web front ends in modern JavaScript frameworks - all continuously integrated, deployed and monitored. Currently pushing at the edge of distributed SQL as a Principal Program Manager for Azure Database for PostgreSQL.

POSETTE 2025 Talk

Hitchhiker's Guide to Row-Level Security in Citus

(Livestream 4)

In the vast and often perplexing universe of databases, securing your data can feel like navigating through the Vogon bureaucracy. Fear not, intrepid data traveler! Join us for a journey through the cosmos of Row-Level Security (RLS) in Citus, where we'll demystify the complexities and pitfalls of implementing RLS in a distributed PostgreSQL environment.

With the reassuring words "Don't Panic" as our guide, we'll explore the ins and outs of RLS, from the basics to advanced configurations. You'll learn how to enable RLS on your tables, create and manage policies, and apply these principles in a multi-tenant setup with Citus. Along the way, we'll encounter some of the common challenges and how to avoid them, ensuring your data remains secure and your sanity intact.

Expect a blend of technical insights, practical demonstrations, and a touch of humor as we navigate this interstellar topic. Whether you're a seasoned database administrator or a curious developer, this talk will equip you with the knowledge and confidence to implement RLS in Citus effectively.

So grab your towel, set your phasers to "secure," and join us for an adventure through the galaxy of data security. After all, in the grand scheme of things, the answer might be simpler than you think.

Add livestream to calendar Register (optional)

Speaker Interview

About the Speaker

  • Tell us about yourself: career, family, passions

    Me and my wife moved to Warsaw roughly six years ago, we had an amazing Australian Shepherd called Iria (named after Irulan Corrino from Dune) unfortunately we said our goodbyes with her last May, she was 14 years old. I'm passionate about database engineering, security, OpenBSD (though slacking lately) and gaming. I like reading the works of H. P. Lovecraft and I have an interest in the past and current history of organized crime (it's interesting from a socio-economic perspective). I used to do a lot of dog trekking, that has been put on hold as Iria grew older. I plan to get back to dog trekking now, as a new puppy Iskra (spark in Polish) joined us, she just needs to grow up a bit. I started driving late in my live and found it more fun than I anticipated initially—I also got back to rolling on the mat doing Brazilian Jiu-Jitsu.

  • What is your icebreaker for PostgreSQL events?

    "So, what are you doing with PostgreSQL?" is my default opener, as I truly enjoy hearing about all the innovative ways people use the database.

  • How do you prepare for an online presentation?

    It's mostly rehearsing the timings and doing dry-runs of the presentation with peers to get early feedback.

  • Which book are you reading right now?

    My current read is a re-read of the Hitchhikers Guide to the Galaxy by Douglas Adams. I just got the Nearly Definite 35th anniversary edition.

About the Talk

  • What will your talk be about, exactly? Why this topic?

    "Hitchhiker's Guide to Row-Level Security in Citus" - Expect a blend of technical insights, practical demonstrations, and a touch of humor as we navigate this interstellar topic. Whether you're a seasoned database administrator or a curious developer, this talk will equip you with the knowledge and confidence to implement RLS in Citus effectively.

  • What is the audience for your talk?

    Talk is aimed for people new to row level security and Citus. We cover both the basic functionality and some of the best practices required to properly employ this feature in a distributed system.

  • What existing knowledge should the attendee have?

    You should be familiar with PostgreSQL itself, know how SQL looks in general, but you don't need to know how to write it. I have given a version of this talk to high school youth in Poland that had absolutely no experience with PostgreSQL and they still were able to interact and ask very on-point questions.

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

    I wish I knew! I guess it's easier with in-person events where you can assess how well the talk is landing and decide to dive deeper or go one level up instead. In either case, I think it's important to tune for the audience. On a PostgreSQL conference I will skip describing the obvious (what PostgreSQL is and some other basics) while on a different event I would dedicate some additional slides to set the context.

About PostgreSQL

  • What inspired you to work with PostgreSQL?

    When I was working on my startup, I had to pick a database engine. I had roughly 7 years of Oracle experience by that time, and maybe a year with MySQL. I evaluated various storage engines (I remember being very impressed with Riak) and ended up picking PostgreSQL as it felt the most mature feature wise and in it's approach of doing the right thing.

  • What is your favorite PostgreSQL feature?

    For built in features that would be Full Text Search, but I consider things around it equally important (GIN, GIST indexes, JSONB).

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

    Being able to extend the database without touching the core engine. There are so many things that the community was able to iterate very quickly on (JSON support, vector support) because these could be implemented in isolation without impacting the stability of the core PG.

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

    Citus is of course my favorite extension, but I am biased as the PM of that project. Apart from Citus my second favorite is pg_trgm, because it's super cool to have indexes used for REGEX and unanchored wildcard searches.

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

    Don't be afraid to open up the code and just read it. I was diagnosing a gnarly hanging insert at my previous job and spent weeks reading the PG implementation of GIN indexes. The documentation for PG is great, you will be able to follow it or just poke around until things make sense. That code reading ended up as a talk at PGCon Ottawa in 2019 and I attribute that as a first step that put the Citus team on my radar.

  • What are your favorite resources for learning about PostgreSQL?

    Apart from the code itself and the project documentation I must mention Hironobu SUZUKI @ InterDB by Hironobu Suzuki. It's a very detailed resource, describing all the low-level details that PG does (how things are laid out in memory, on disk, how everything works). I love it and read it frequently!

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

    I mentioned the hanging insert, because how often do you dtrace and disassemble a running PostgreSQL to confirm that a pending list is being merged into the btree? Apart from that, the most gnarly related issue I remember was a machine where PG reported data corruption, ZFS reported data corruption (at different places than PG) and nothing made sense. It was ECC ram failing, but I was questioning reality before we found out what it is.

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

    Not understanding what bloat is and how to avoid it, so people hit the TXID wraparound, then they spend time tuning autovacuums while in the first place they should look at their app and see if they are generating unnecessary bloat. I had a talk on that at PGConf in Prague.

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

    Curiosity and patience, when something feels off just take your time, examine it and reason why is it the way it is. That can get you to surprising places and you may find that PG is good at many things, but you need to spend the time to learn it.

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

    Yes, like mentioned before, the ability to look at how things are implemented is a game changer. You can tell exactly what and why the database is doing something, even if it is not documented. You can also try and change that if needed.

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

    In the paper "Implementation of Postgre" by "Michael Stonebraker, Lawrence A. Rowe and Michael Hirohama" the authors state, that they spawn a system process for each active user and mentions that it's only an expedient to get a system operational while they plan to use threads. I would like a magic wand to have them finish that work (or make it event based instead) 🙂. Here’s a quote from the paper:

    A last aspect of our design concerns the operating system process structure. Currently, POSTGRES runs as one process for each active user. This was done as an expedient to get a system operational as quickly as possible. We plan on converting POSTGRES to use lightweight processes available in the operating systems we are using. These include PRESTO for the Sequent Symmetry and threads in Version 4 of Sun/O.

    – Michael Stonebraker, Lawrence A. Rowe and Michael Hirohama ERL-M90-34.pdf (berkeley.edu)

About POSETTE & Events

  • Have you enjoyed previous POSETTE (formerly Citus Con) conferences, either as an attendee or as a speaker?

    Yes, I enjoyed as a speaker, organizer and attendee! 🙂

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

    I really wanted to update my FTS talk and Posette has great production values, so it is a nice target to practice. I just wished the time slots would be larger!

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

    The community is friendly, don't stress and push through any errors during the talk - we all make mistakes and nobody in the audience will mind.

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

    What would be helpful for a first-time speaker? If in a room with an audio setup, talk a bit at the beginning to get used to the sound of your own voice (it sometimes echoes back but your mind will cancel it out in a second). Don't rush through the content, make pauses and don't read the slides.

Past Talks

talk bubbles
Join the conversation

Use the hashtag #PosetteConf