---
title: "Vectors are the new JSON"
publication: "Postgres Weekly"
issue: 512
published_at: "2023-06-28"
canonical_url: "https://postgresweekly.com/issues/512"
---

Plus how Postgres manages memory, and just who are the 'core team'? |        

#​512 — June 28, 2023 

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

Together with [![Sleuth\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_380,h_100/e_make_transparent/co_white,e_outline:7/dm8pbpm4svdu3ggeoyqk.png)](https://www.sleuth.io/zero-to-one-hundred-deploys-cooperpress?utm_source=newsletter&utm_medium=referral&utm_campaign=postgres)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/ypqkugc1ztfipt0dquwj.jpg)](https://jkatz05.com/post/postgres/vectors-json-postgresql/)  

[Vectors are the New JSON in Postgres](https://jkatz05.com/post/postgres/vectors-json-postgresql/) — 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](https://github.com/pgvector/pgvector) is doing a great job of handling so far). 

Jonathan Katz   

[Memory Context: How Postgres Allocates Memory](https://www.cybertec-postgresql.com/en/memory-context-for-postgresql-memory-management/) — 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      [![\](https://copm.s3.amazonaws.com/cb847ce8.png)](https://www.sleuth.io/zero-to-one-hundred-deploys-cooperpress?utm_source=newsletter&utm_medium=email&utm_campaign=postgres) 

[Bring Your Team from 1 Deploy a Week to 100 Deploys a Day](https://www.sleuth.io/zero-to-one-hundred-deploys-cooperpress?utm_source=newsletter&utm_medium=email&utm_campaign=postgres) — 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](https://www.sleuth.io/zero-to-one-hundred-deploys-cooperpress?utm_source=newsletter&utm_medium=email&utm_campaign=postgres).   

✅ **Not enough time to read through an eBook to learn how to deploy faster?** [Here's a quick milestone checklist](https://www.sleuth.io/checklist-cooperpress?utm_source=newsletter&utm_medium=email&utm_campaign=postgres) 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](https://aws.amazon.com/blogs/database/encrypt-amazon-rds-for-postgresql-and-amazon-aurora-postgresql-database-with-minimal-downtime/) — 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:** 

- When we refer to Postgres's "core team" or its "contributors", how do you know who those people are? Luckily the official Postgres site [has an entire page listing its contributors](https://www.postgresql.org/community/contributors/) past and present.
- 🇪🇸 If you'd like to speak at [Postgres Ibiza](https://pgibz.io/) this August, you've got _two more days_ to [submit your proposal](https://docs.google.com/forms/d/e/1FAIpQLScbeORspi5tlWMkH3OebnrPatWmqCCH9mdNfECBh1j_Fp90yg/viewform).
- 🇧🇪 There's a [quick roundup of PgDay Belgium 2023](https://bertelsw.im/posts/pgconf.be.2023.html) that took place recently, including links to [raw videos of the talks](https://pgconf.be/rec/) (in MKV format for now).   

[Writing a Streaming Chat App in Django 4.2](https://valberg.dk/django-sse-postgresql-listen-notify.html) — 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](https://www.postgresql.org/docs/current/sql-notify.html) pub/sub mechanism with it to stream live events to end clients. 

Víðir Valberg Guðmundsson   

[Performance Tips for Foreign Data Wrappers](https://www.crunchydata.com/blog/performance-tips-for-postgres-fdw) — _“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](https://aklaver.org/wordpress/2023/06/22/using-icalendar-rrule-in-postgres/) — iCalendar is a data format for representing calendars and schedules, and [RRULE](https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html) 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](https://mayallo.com/group-by-year-month-day-postgresql/) — 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](https://www.enterprisedb.com/accounts/register/biganimal?utm_source=postgresweekly&utm_medium=link&utm_campaign=GL-DS--BigAnimal-DSS) 

EDB BigAnimal sponsor   

[Replacing Apache Hive, Elasticsearch and Postgres with Apache Doris](https://blog.devgenius.io/replacing-apache-hive-elasticsearch-and-postgresql-with-apache-doris-de3840cdc792) — 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](https://pgdash.io/blog/finding-unused-indexes-in-postgresql.html?r) — 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](https://www.orioledata.com/blog/beta-released/) — OrioleDB is an alternative modern storage engine for Postgres (here’s [the architecture docs](https://github.com/orioledb/orioledb/blob/main/doc/arch.md)) 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.](https://github.com/orioledb/orioledb) 

Alexander Korotkov   

- [serverless-pg 2.1](https://github.com/MatteoGioioso/serverless-pg)
 ↳ Serverless-scale Postgres connection management for Node.js.
- [Bytebase 2.3](https://github.com/bytebase/bytebase)
 ↳ Database devops and CI/CD for teams.
- [pgrx 0.9.6](https://github.com/tcdi/pgrx)
 ↳ Build Postgres extensions with Rust.
- [pgwire 0.15](https://github.com/sunng87/pgwire)
 ↳ Postgres's wire protocol in a Rust library.    

**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|*).
