Rust in Production

Tembo with Adam Hendel

28 snips
Jun 12, 2025
In a fascinating discussion, Adam Hendel, founding engineer at Tembo, explores the creation of PGMQ, a job queue system designed for Rust developers using Postgres. He dives into the challenges of asynchronous programming in Rust with PostgreSQL, sharing insights on optimizing performance through advanced setup and strategies. Adam also reflects on his journey learning Rust, comparing it to Python, and highlights the growing role of Rust in machine learning. A wealth of engineering decisions and personal anecdotes make this conversation a must-listen for tech enthusiasts!
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

How Postgres Extensions Work

  • Postgres extensions link SQL functions to shared objects compiled from Rust or C.
  • State management in extensions requires using Postgres memory or intermediate tables via the server programming interface.
ADVICE

Optimize Batch Operations With SQL

  • Avoid overly relying on pgrx's SPI layer for batch operations due to serialization overhead.
  • Use SQL for bulk queue operations to improve performance while retaining Rust client APIs.
ANECDOTE

Rust Idiomatic API for pgmq

  • The pgmq Rust client creates idiomatic Rust abstractions for Postgres-based queues using generic traits.
  • It leverages SQLX for compile-time checked SQL to provide safety and ease-of-use for Rust developers.
Get the Snipd Podcast app to discover more snips from this episode
Get the app