#​575 — October 30, 2024

Web Version

📝 If you wondered where last week's issue was, don't worry, you didn't miss anything, we had a week off. We're now here every Wednesday until the Christmas break.
__
Peter Cooper, your editor

Together with  pgAnalyze

Postgres Weekly

pgdoc.link: A New Way to Search Postgres Documentation — Hubert has been looking for a way to work around inconsistencies in looking up Postgres docs – this is the result. If there’s a single, canonical document for what you search for, you’re taken straight to it, otherwise you get a page helping you resolve the ambiguity (e.g. *_connections). This is a neat idea.

Hubert 'depesz' Lubaczewski

4 Ways to Create Date Bins in Postgres — When you need to generate a report or otherwise bundle up data within certain ‘bins’ of dates (e.g. a full month, quarter, or year) Postgres offers several ways to do it. Christopher looks at INTERVAL, date_trunc, extract and to_char, each of which has its pros and cons.

Christopher Winslett

How to Compare Postgres EXPLAIN Plans & Tune Slow Queries — Are slow Postgres queries impacting your app performance? Join this webinar to learn how to diagnose and tune them effectively. We'll use pganalyze to walk through how to compare plans & debug common scenarios like inefficient nested loops & missing indexes.

pganalyze sponsor

Case Study of Optimizing a 'Weirdly Picked' Bad Plan“We recently hit an interesting case where planner picked wrong plan. Kinda. And figured it could be used to show how to deal with such cases.”

Hubert depesz Lubaczewski

QUICK BITS:

Speaking in Tongues: Postgres and Character Encodings — Character encodings may be the definitive ‘important but I don’t want to think about it’ topic when it comes to databases. Luckily, using UTF-8 gets you most of the way to a happy place.

Christophe Pettus

Using CTID Based Pagination for Data Cleanups — The CTID field is unique for every row in a table but is no mere simple row ID. It’s a tuple that combines both physical page and row position information, and can help you process a table in predictable chunks based on physical storage.

Shayon Mukherjee

How to Build an Image Search App with OpenAI CLIP, Postgres, and JavaScript — A tutorial that brings together a lot of ideas in one place. CLIP is used to turn images into text descriptions. Postgres is used as a vector database. JavaScript provides the glue for both the frontend (with React) and backend (Node.js).

Haziqa Sajid

Request-Reply in Postgres“I wondered the other day if you could build a request-reply mechanism using plain Postgres components. Turns out, you can! Whether or not you should is left as a decision for the reader.”

Anthony Accomazzo

📄 The Future of Postgres? Extensions! Craig Kerstiens

📄 Vehicle Routing with PostGIS and Overture Data Paul Ramsey

📰 Classifieds

Trouble with indexing, data types, or stored procedures & functions? Watch Redgate’s latest PG101 webinar episodes to learn tips & tricks.


How Google handles authorization at scale. A technical comparison of Google's Relationship-based authz system and Oso's Authz as a Service.

🛠 Code and Tools

Postgres Version Report — An online tool where you paste your Postgres server’s full version information and you get to where it stands in relation to Postgres’ release schedule, outstanding CVEs, bugs, and what improvements have been made in later versions.

Neon

pg_duckdb: DuckDB-Powered Postgres for High Performance Analytics — An official Postgres extension (built in collaboration with Hydra and MotherDuck) that embeds DuckDB’s columnar-vectorized analytics engine and features into Postgres.

DuckDB

💡 MotherDuck has a really good blog post about the pg_duckdb release, what it enables, and how to use it.

pg_parquet: An Extension to Connect Postgres and Parquet — A new open-source extension for working with Parquet files. It reads and writes parquet files to local disk (or S3) right from Postgres. GitHub repo.

Craig Kerstiens

  • pgroll 0.7 – Zero-downtime schema migration tool for Postgres.

  • pgenv 1.3.8 – PostgreSQL binary manager.