Presentation: Introduction to the PGXN Architecture

Feb 1, 2024 • 2 min read

blog post hero image

At Tembo, we firmly believe extensions are the key to the “just use Postgres” future. In fact, along with workload-specific infrastructure, new extensions and combinations of tools power the success of Tembo Stacks.

We want to see the usage of extensions continue, and indeed to grow, which is why we’ve made a significant investment to improve the Postgres extension distribution ecosystem. We want to work with the Postgres community to design, build, and benefit from the best possible system of extension design, development, and distribution as we can.

I do, too, which is why I was happy to join the team and work toward that vision.

As we start collaborating with the community and thinking through the jobs and tools required of the extension ecosystem of the future, we thought it would be useful to learn about some of the distribution architecture that exists today.

To that end, I put together a presentation on the PGXN architecture: its distributed JSON file design, its component services, and how they interact. This diagram illustrates the PGXN components and how they interact with each other:

PGXN Architecture Diagram

  • PGXN Manager maintains the registry Postgres database, handles user registration and extension releases, and updates the static files on the root mirror
  • The search API regularly rsyncs from the root mirror to index new releases
  • The main site is a think layer over the API, providing a nice interface for searching extensions, reading documentation, and downloading releases
  • The pgxn client uses the search API or, optionally the root mirror or any mirror to find, download, build, and install extensions
  • CI/CD tools like pgxn-tools automate testing, bundling, and releasing extensions via the Manager’s REST interface

For the details, take in the presentation I made to the Tembo team, which we’re happy to share more widely: