#398 — March 24, 2021

Web Version

Postgres Weekly

pg_query 2.0: The Easiest Way to Parse Postgres Queriespg_query is a standalone library for parsing Postgres SQL queries - version 2 adds support for Postgres 13 and includes a deparser so that manipulated parse trees can be turned back into SQL.. big opportunities there. It’s a C library but available in a Ruby library as well as Python and Node.js bindings.

Lukas Fittl

🐘The State of PostgreSQL 2021 Survey Is Now Open ✨ — Whether you’re new to Postgres or a decades-long contributor, we’d love to hear from you. Just like with last year's survey, we'll publish key findings and make anonymized source data available for everyone in the Postgres community 👉 Start the survey.

Timescale sponsor

Getting Started with EXPLAIN (ANALYZE) — Prefixing a query with EXPLAIN lets you see how Postgres’s execution planner has interpreted the query and how it plans to execute it. The ANALYZE option goes a bit further and actually runs the query supplementing the more general information.

Kat Batuigas

Sharding Postgres on a Single Citus Node: How, Why and When — Citus is designed for horizontally scaling Postgres across lots of nodes but what if you just have one? You can still play and test.

Onder Kalaci

Three Easy Things To Remember About Postgres Indexes — From 2020 but we missed it at the time.

Kat Batuigas

Don't Let Collation Versions Corrupt Your Postgres Indexes“Collations and dependencies are nerdy topics — a bit like leap seconds and time zones: you know, the kinds of obscure things you don’t normally have to worry about until something is broken.”

Thomas Munro

Writing a Postgres SQL Pretty Printer in Rust: Part 1 — The first in a planned series of blog posts about the development of pg-pretty, a Rust-based SQL pretty printer work-in-progress.

Dave Rolsky

Fauna: All the Goodness of Postgres, Without Operational Bottlenecks — Fauna combines the safety of Postgres with schema flexibility, modern capabilities and limitless scale. Learn more...

Fauna sponsor

Managing Multiple Postgres Instances on FreeBSD — By using different profiles with rc.conf.

Luca Ferrari

How to Check and Resolve Bloat in Postgres — A perennial topic.

Asif Rehman

Setting Up SSL Authentication for Postgres

Hans-Jürgen Schönig

Ltree Hierarchy: Organize ActiveRecord Models Into a Tree using Postgres's Ltree Type — This library is for Rubyists, but more generally you can learn about this technique in Saving a Tree in Postgres Using LTREE from 2017.

Cédric Fabianski