#​497 — March 15, 2023

Web Version

Together with  Percona logo

Postgres Weekly

The PostgreSQL 14 Internals Book — In development for quite some time and based around a series of fantastic technical articles by Egor Rogov, PostgreSQL 14 Internals is a now fully completed book and available as a PDF here. Don’t be worried that it’ll be too technical for you – it’s packed with code-driven examples and diagrams and it’s easy to narrow down to the topics that might interest you like locks, indexes, or how Postgres processes queries.

Egor Rogov and Liudmila Mantrova

HA and DR Recipes for PostgreSQL on Kubernetes — Watch this on demand webinar to learn how Percona Distribution for PostgreSQL Operator allows you to deploy and manage highly available and production-grade PostgreSQL clusters on Kubernetes.

Percona sponsor

The Wonders of Logical Decoding Messages — Did you know that you can write data directly to Postgres’s write-ahead log (WAL)? Logical decoding can then be used to retrieve this data and process and relay it in various ways. Gunnar explains how and looks at why you might want to do this (spoiler: it could be used for audit logging.)

Gunnar Morling

System Roles: What, Why, and How? — Since v9.6, Postgres has introduced a variety of built-in roles, such as pg_read_all_data and pg_monitor. Hubert walks through them and what they allow users to do, but warns us of their global nature.

Hubert depesz Lubaczewski


Introduction to Postgres Backups — An overview and comparison of some backup options available to Postgres users, including pg_dump, pg_basebackup, and pgBackRest.

Philip Hurst

What's Postgres Got to Do with AI? — A look at using Ruby and OpenAI’s API to get embeddings for your data (recipes in this case), feeding (ha!) them into Postgres and storing and querying the resulting vectors.

Christopher Winslett

Adopting PgCat: A Next-Gen Postgres Proxy — The story of Instacart’s exploration and adoption of PgCat (a Postgres connection pooler/proxy with load-balancing, replica failover and concurrency features.)

Abdelraouf, Kabani, Tanner (Instacart)

Webinar: How to Use the Postgres Query Planner to Debug Bad Plans and Speed Up Queries

pganalyze sponsor

Using Rust, Axum, Postgres, and Tokio to Build a Blog — This is only tangentially about Postgres, but shows off a way to use it from an up and coming Rust framework.


Postgres 15's Custom WAL Resource Managers
Michael Paquier

Building an AI-Powered ChatBot using Vercel, OpenAI, and Postgres
Raouf Chebri (Neon)

🛠 Code and Tools

pg_tiktoken: Postgres Extension for Fast BPE Tokenization — Streamlines text tokenization in Postgres databases. You can use tiktoken_encode for easy tokenized outputs and tiktoken_count to check text length limits, such as those in OpenAI’s language models.

Stas Kelvich (Neon)

pg_timetable v5.3 Released — pg_timetable is an advanced standalone job scheduler for Postgres. This is a logging focused release. You can now disable logging (possibly useful in high load environments), enable log rotation, and more. GitHub repo.

Pavlo Golub

  • Martin 0.8
    ↳ Generate vector tiles from PostGIS databases on the fly.

  • Goose 3.10
    ↳ Database migrations with SQL or Go functions.

  • data-diff 0.5
    ↳ Diff data in/across relational databases.

  • pgx 0.7.4
    ↳ Build Postgres extensions with Rust.

  • DenoDB 1.4
    ↳ Multi database ORM for Deno (JS runtime).