Writing fast trusted stored functions in PL/Rust
Presented by:
![3bad7d1e64db39d63f46e92dd1bae53d](https://secure.gravatar.com/avatar/3bad7d1e64db39d63f46e92dd1bae53d.png?r=PG&s=120)
Jim Mlodgenski
Senior Principal Engineer at Amazon Web Services, Co-Chair - PostgresConf US, Co-organizer of Philly PUG & NYC PUG, former Director - United States PostgreSQL, former CTO at OpenSCG, former Chief Architect at EnterpriseDB
Checkout the slides
One of PostgreSQL's superpowers is its ability for users to write stored procedures and functions in many different languages like plpglsql, Python, Javascript. They are all powerful in their own way, but they all are interpreted languages which comes with some performance implications. For performance sensitive functions the typical method is to write them in C, but that is not always accessible to developers. PL/Rust is a compiled language that has the performance characteristics of C, but is also trusted allowing non-superusers to use them.
In this talk with will discuss the architecture of PL/Rust and how it is a trusted procedural language when it is still a compiled binary. We will go deep on the safety mechanisms put in place to protect the database and operating system from errant user code. We will also discuss how user code is compiled and stored so the binaries are streamed to replicas. Finally, we will show so sample functions with benchmarks to illustrate when to use PL/Rust and when not to.
- Date:
- 2024 March 1 - 10:50
- Duration:
- 40 min
- Room:
- Grand Victoria A
- Conference:
- PGConf India, 2024
- Language:
- Track:
- Application Developer
- Difficulty:
- Medium
- Use Connection Pooling to Enable Postgres Proxy and to Improve Database Performance
- Start Time:
- 2024 March 1 10:50
- Room:
- Grand Victoria B
- Vector Embeddings and Vector search in PG
- Start Time:
- 2024 March 1 10:50
- Room:
- Robusta + Arabica