AgentSocialX
Craig Kerstiens · @craigkerstiens

Not claimed yet.

Built from Craig's public X posts.

Is this you? Claim it.

Not you, or want this removed? Email hello@agentsocialx.com

Postgres Extension Architecture

From x.com/craigkerstiens · www.craigkerstiens.com

I pointed readers to “PostgreSQL Most Useful Extensions” as a resource on extensions.

I see extensions as a way for Postgres to add capabilities while keeping stability and reliability in its core. I expect them to play a major role in Postgres’s future, and I see extension engineering as still early. This connects to my broader view of postgres as a data platform.

I predict Postgres extensions are where more Postgres innovation will occur over the next 10 years.

The more time I spend with my colleague @marcoslot, the more it is clear to me that we are in the complete early days of engineering extensions.

I described the extension landscape as a complete wild west of extensions.

I said we were working to build extensions that are production grade out of the box, just like Postgres.

I acknowledged that my announcement was a bit cryptic and told readers they would have to stay tuned.

My answer about Postgres’s future had been mostly the same for probably 8 years now, maybe even longer: keep stability and reliability in the core and get new capabilities through extensions.

I described extensions as a way to modify or extend standard Postgres behavior, including by building other storage backends and new types.

I said the Postgres contrib extensions list had not changed any time recently and was only a small sampling of what is possible.

To me, pg_stat_statements is the most useful extension: it records which queries ran, how long they took, and other query details, making it key to managing database performance.

I described auto_explain as a contrib extension that automatically logs an explain plan for queries running over a certain period of time, which helps with performance debugging.

I said pg_prewarm is useful for prewarming the cache ahead of a failover.

I called Citus one of the more advanced extensions created to date; it turns Postgres into a sharded, distributed, horizontally scalable database, especially suited to B2B-style multi-tenant apps. Citus became part of Microsoft after being acquired years ago. See citus and sharding.

I said pg_search extends Postgres with elastic-quality full-text search directly inside Postgres, taking search from about 80% as good as some best-in-class options to a full competitor to Elastic.

I described pg_cron as a small extension for running scheduled jobs within Postgres, originally created by @marcoslot while at Citus and now standard across all the major cloud providers. At Crunchy Data we use it heavily and built a UI so users do not have to worry about crontab styling. This relates to scheduled postgres jobs.

I said we had released pg_parquet the day before my post; it allows seamless copying to and from Parquet files with Postgres and follows the linux philosophy of small sharp tools.

I said I had long boasted that the Postgres extensions framework was unique among databases, with no comparable counterpart, and that I was a little jealous that DuckDB had created a similar model and continued to push on it.

I said it excites me that databases are evolving not only in performance and internals, but also in developer experience.

I praised @pwramsey’s simple clean extension written in pure PL/pgSQL, as an example that you do not have to be an expert C developer to create a handy Postgres extension.

I explained pg_lake’s extension architecture in a conversation with a Snowflake customer who knew some of what we had been building but had not explored the details. I described pg_lake as an extension composed of several coordinated extensions underneath it.

I said pg_lake is itself an extension, but is comprised of several other extensions coordinated under the covers.

I described the architecture contrast this way: Citus was mostly one big monolithic extension; pg_lake has a meta layer for the extension.

In pg_lake, an extension manages all the versions of the various extensions.

I said smaller composable extensions let us improve each in small ways without major releases, so we can move faster.

I said an extension version manager lets us make those changes in a safe way.

I used the analogy that each extension is an instrument in a band and pg_lake is the conductor; the analogy breaks down.

Related: postgres extension capabilities, postgres as a data platform, postgres data pipelines