#​512 — June 28, 2023

Web Version

Together with  Sleuth

Postgres Weekly

Vectors are the New JSON in Postgres — When the popularity of JSON as an interchange format was rocketing and everyone and their dog was building a document oriented database, Postgres wisely added native JSON support and gradually introduced powerful ways to work with it. With machine learning and language model embeddings now making vectors the data structure du jour, Postgres has a fresh opportunity here too (which pgvector is doing a great job of handling so far).

Jonathan Katz

Memory Context: How Postgres Allocates Memory — Memory management in C is famously fun.. tricky and prone to leaks. Postgres uses an approach called ‘memory contexts’ (known as ‘arenas’ in some scenes) where memory is provided from large preallocated chunks that can be freed up all at once when the context for said memory ends. This post introduces the idea, how it affects Postgres, and how to monitor their use.

Laurenz Albe

Bring Your Team from 1 Deploy a Week to 100 Deploys a Day — Are you curious about how companies like Atlassian, Google, and Netflix manage to deploy so frequently? What strategies do they use to achieve such high efficiency? Don't worry, this guide has got you covered with some helpful tips and tricks on how these companies scaled their deployments. Check it out for yourself.

Not enough time to read through an eBook to learn how to deploy faster? Here's a quick milestone checklist to guide you through the steps, so you can go from deploying once a week up to 100 times a day.

Sleuth sponsor

Encrypting Amazon RDS or Amazon Aurora Postgres Databases — If your AWS-based databases are unencrypted and you’d like to encrypt them, doing that with minimal downtime involves a little work with replication and snapshots.

Bhupathi and Sakhuja (AWS)

IN BRIEF:

Writing a Streaming Chat App in Django 4.2 — This is interesting for two reasons: First, the latest version of the popular Python framework now directly supports streaming HTTP responses. Second, you can use Postgres’ LISTEN / NOTIFY pub/sub mechanism with it to stream live events to end clients.

Víðir Valberg Guðmundsson

Performance Tips for Foreign Data Wrappers“You can’t just let Postgres make the decisions for you, you need to take a hands on approach.”

Christopher Winslett

Using iCalendar RRULE in Postgres — iCalendar is a data format for representing calendars and schedules, and RRULE is its way to define recurring events. That’s a useful thing for many apps and you can bring it into Postgres too with a little Python.

Adrian Klaver

Grouping Results by Year, Month, or Day — Say hello to DATA_TRUNC(), EXTRACT(), and TO_CHAR().

Mohamed Mayallo

Run the Same Postgres Fully Managed on Any Cloud. Start for Free with $300 in Credits

EDB BigAnimal sponsor

Replacing Apache Hive, Elasticsearch and Postgres with Apache Doris — I can’t see an article about replacing Postgres with a Java-based MySQL-compatible database going down well here, but in the interests of fairness.. 😆 Plus it's called Doris, which is fantastic.

Apache Doris Team

Finding Unused Indexes — Unused indexes present a cost when data is inserted, a schema is migrated, and in terms of storage used, so it's worth knowing when they're lurking about..

RapidLoop / pgDash

Code and Tools

OrioleDB Storage Engine Now in Beta — OrioleDB is an alternative modern storage engine for Postgres (here’s the architecture docs) targeting use cases where there might be high transaction throughput, large numbers of updates, locking bottlenecks, etc. It’s not recommended for production usage, but the team are confident enough to suggest you put it through its paces on your test workloads. GitHub repo.

Alexander Korotkov

  • serverless-pg 2.1
    ↳ Serverless-scale Postgres connection management for Node.js.

  • Bytebase 2.3
    ↳ Database devops and CI/CD for teams.

  • pgrx 0.9.6
    ↳ Build Postgres extensions with Rust.

  • pgwire 0.15
    ↳ Postgres's wire protocol in a Rust library.