Extensions on demand
Nik and Kirk are joined by Álvaro Hernández to discuss how Postgres in containers gets its extensions: a fat image with all of them, extensions downloaded at run time, or StackGres Containers, built on DOCIR (Dynamic OCI Registry), which composes an image with only the extensions you ask for, on demand. They also discuss what this means for security, pinning versions, and major upgrades.
Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://www.youtube.com/watch?v=7oeAAqU00zk
Nik and Kirk are joined by Álvaro Hernández to discuss how Postgres in containers gets its extensions: a fat image with all of them, extensions downloaded at run time, or StackGres Containers, built on DOCIR (Dynamic OCI Registry), which composes an image with only the extensions you ask for, on demand. They also discuss what this means for security, pinning versions, and major upgrades.
Here are some links to things they mentioned:
Times are podcast times of the first mention.
Here are some links to things they mentioned:
Times are podcast times of the first mention.
Main link
- [00:18:54] Dynamic containers for PostgreSQL: what we measured (DBLab Forge brief, PostgresAI) https://console.postgres.ai/shared/brief/c501d438-b872-4705-89a6-bdab30ea1680
Álvaro and StackGres
- [00:00:25] Álvaro Hernández https://postgres.fm/people/alvaro-hernandez-tortosa
- [00:01:16] StackGres Containers (public beta; the images come from the registry host sgcr.io, and the demo used sgcr.dev, a dev instance) https://stackgres.io/containers
- [00:14:52] StackGres https://stackgres.io
- [00:20:55] PostgreSQL extensions in StackGres, loaded into running pods (docs) https://stackgres.io/doc/latest/features/extensions/
- [00:24:28] StackGres extensions cache, experimental (docs) https://stackgres.io/doc/latest/administration/extensions/cache/
- [01:04:08] Why Postgres extensions should be packaged and distributed as OCI images (Álvaro Hernández, 2024) https://ongres.com/blog/why-postgres-extensions-should-be-distributed-and-packaged-as-oci-images/
Episodes
- [00:00:25] Our previous episode with Álvaro: Citus + StackGres https://postgres.fm/episodes/citus-stackgres
Hacking sessions
- [00:31:33] Hacking Postgres sessions with Andrey, Kirk and Nik (YouTube playlist, PostgresTV) https://www.youtube.com/playlist?list=PLH8y1BNPAKjKDdJA7sDmFWUkbbYux3TRz
Postgres and extensions
- [00:38:51] extension_control_path, new in Postgres 18 (docs) https://www.postgresql.org/docs/18/runtime-config-client.html#GUC-EXTENSION-CONTROL-PATH
- [00:50:56] pg_background https://github.com/vibhorkum/pg_background
- [00:50:58] plsh (Peter Eisentraut) https://github.com/petere/plsh
- [01:02:58] PGXN, the PostgreSQL Extension Network https://pgxn.org
- [01:04:40] POC: Distributing Trunk binaries via OCI (David E. Wheeler, 2024) https://justatheory.com/2024/06/trunk-oci-poc/
- [01:05:12] Anarchy in the Database: a survey and evaluation of DBMS extensibility (Kim, Slot, Andersen, Pavlo, VLDB 2025; tests extensions in pairs) https://www.vldb.org/pvldb/vol18/p1962-kim.pdf
Containers
- [00:01:22] OCI image format specification https://github.com/opencontainers/image-spec
- [00:41:19] Spilo (Zalando), one Postgres image with several major versions https://github.com/zalando/spilo
- [01:05:43] Testcontainers, PostgreSQL module https://testcontainers.com/modules/postgresql/
Other
- [00:36:32] Mitchell Hashimoto on never updating dependencies unless it breaks (post on X, 2026-05-20) https://x.com/mitchellh/status/2057171518027887035
~~~
What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc!
What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc!
~~~
Postgres FM is produced by:
- Michael Christofides, founder of pgMustard
- Nikolay Samokhvalov, founder of PostgresAI
With credit to:
- Jessie Draws for the elephant artwork
- Intro and outro music: our own arrangement of Apple Loops from GarageBand (royalty-free under the GarageBand licence)
Creators and Guests
Guest
Kirk Wolak
Software Architect at KiraSoft, GSoC mentor, and a cohost with Nik on the Youtube Hacking Postgres series