---
title: "A fantastic Postgres book"
publication: "Postgres Weekly"
issue: 497
published_at: "2023-03-15"
canonical_url: "https://postgresweekly.com/issues/497"
---

Plus a 'next gen' Postgres proxy, interesting uses for logical decoding messages, and an update to the pg_timetable. |        

#​497 — March 15, 2023 

[Web Version](https://postgresweekly.com/issues/497)  

Together with [![Percona logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_600,h_120/e_make_transparent/co_white,e_outline:7/iplxngwgax1ktho5k45h.png)](https://learn.percona.com/high-availability-and-disaster-recovery-recipes-for-postgresql-on-kubernetes?utm_campaign=22q2-cm-campaign-pg-high-availability&utm_source=postgres-weekly&utm_content=ondemand-webinar)  

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/jawznuoo5ekdwoasnwga.jpg)](https://postgrespro.com/blog/pgsql/5969985)   

[The _PostgreSQL 14 Internals_ Book](https://postgrespro.com/blog/pgsql/5969985) — 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.](https://edu.postgrespro.com/postgresql_internals-14_en.pdf) 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   [![\](https://copm.s3.amazonaws.com/1a7c0172.png)](https://learn.percona.com/high-availability-and-disaster-recovery-recipes-for-postgresql-on-kubernetes?utm_campaign=22q2-cm-campaign-pg-high-availability&utm_source=postgres-weekly&utm_content=ondemand-webinar) 

[HA and DR Recipes for PostgreSQL on Kubernetes](https://learn.percona.com/high-availability-and-disaster-recovery-recipes-for-postgresql-on-kubernetes?utm_campaign=22q2-cm-campaign-pg-high-availability&utm_source=postgres-weekly&utm_content=ondemand-webinar) — 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](https://www.infoq.com/articles/wonders-of-postgres-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?](https://www.depesz.com/2023/03/14/system-roles-what-why-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   

**IN BRIEF:** 

- Craig Kerstiens points us toward [this online interactive tutorial on CTEs and window functions](https://www.crunchydata.com/developers/playground/ctes-and-window-functions) on the _CrunchyData_ site.
- This week's _PostgreSQL Person of the Week_ [is Vincent Picavet](https://postgresql.life/post/vincent_picavet/), a GIS expert who shares a little about his geospatial work with Postgres in this interview. His favorite projection? [Octant projection](https://en.wikipedia.org/wiki/Octant_projection) with Reuleaux triangles. Yes, I had to look it up too 😁
- Amazon RDS now supports [PostgreSQL 14.7, 13.10, 12.14, and 11.19.](https://aws.amazon.com/about-aws/whats-new/2023/03/amazon-rds-postgresql-support-additional-minor-versions/)   

[Introduction to Postgres Backups](https://www.crunchydata.com/blog/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?](https://www.crunchydata.com/blog/whats-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](https://tech.instacart.com/adopting-pgcat-a-nextgen-postgres-proxy-3cf284e68c2f) — The story of Instacart’s exploration and adoption of [PgCat](https://github.com/levkk/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](https://us02web.zoom.us/webinar/register/9616771728214/WN_7qUU9ALeQ6K1G_z-kMG-Nw) 

pganalyze sponsor   

[Using Rust, Axum, Postgres, and Tokio to Build a Blog](https://spacedimp.com/blog/using-rust-axum-postgresql-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. 

SpaceDimp   

[Postgres 15's Custom WAL Resource Managers](https://paquier.xyz/postgresql-2/postgres-15-custom-rmgr/) 
Michael Paquier   

[Building an AI-Powered ChatBot using Vercel, OpenAI, and Postgres](https://neon.tech/blog/building-an-ai-powered-chatbot-using-vercel-openai-and-postgres) 
Raouf Chebri (Neon)    

🛠 Code and Tools  

[pg_tiktoken: Postgres Extension for Fast BPE Tokenization](https://neon.tech/blog/announcing-pg_tiktoken-a-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](https://www.cybertec-postgresql.com/en/pg_timetable-v5-3-is-out/) — 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.](https://github.com/cybertec-postgresql/pg_timetable) 

Pavlo Golub   

- [Martin 0.8](https://github.com/maplibre/martin)
 ↳ Generate vector tiles from PostGIS databases on the fly.
- [Goose 3.10](https://github.com/pressly/goose)
 ↳ Database migrations with SQL or Go functions.
- [data-diff 0.5](https://github.com/datafold/data-diff)
 ↳ Diff data in/across relational databases.
- [pgx 0.7.4](https://github.com/tcdi/pgx)
 ↳ Build Postgres extensions with Rust.
- [DenoDB 1.4](https://github.com/eveningkid/denodb)
 ↳ Multi database ORM for Deno (JS runtime).    

**Got a new email?** You can [change your address here](https://postgresweekly.com/edit_subscription/*|UID|*). 

--- 

**Bored of us?** [Click here to stop getting Postgres Weekly](https://postgresweekly.com/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. Thanks! 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada. 

[Stop getting this newsletter.](https://postgresweekly.com/leave/*|UID|*)
