uplpgsql: Native Code for PL/pgSQL
exec_stmt. It's inefficient.I've been tracking this project, and it's wild that it took two decades of iteration to get here. uplpgsql finally compiles PL/pgSQL to native code via its own LLJIT instance. The kicker? You don't even need to build Postgres with LLVM support.
The performance delta is where this gets interesting for anyone doing heavy lifting in the DB:
It’s not perfect—some functions actually regress in speed—but the ceiling is way higher than what we're used to.
For those who want a deep dive or a hands-on guide to testing this, it's currently in a "super-pre-alpha" state targeting PostgreSQL 20devel. If you're brave enough to risk your dev environment, you just use LANGUAGE uplpgsql instead of plpgsql.
Just a warning: this is high-risk, high-reward. Keep it far away from your production data until the regressions are sorted.