---
title: "Postgres in WebAssembly"
publication: "Postgres Weekly"
issue: 544
published_at: "2024-02-28"
canonical_url: "https://postgresweekly.com/issues/544"
---

Plus WAL investigations, using OpenAI from Azure Database, and a way to trace Postgres locks on Linux. |        

#​544 — February 28, 2024 

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

Together with [![Redgate\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_800,h_192/e_make_transparent/co_white,e_outline:9/juuaxaie2hv6pua7rl7k.png)](https://www.red-gate.com/solutions/entrypage/state-of-database-landscape-2024/multiple-database-platforms?utm_source=postgresweekly&utm_medium=email&utm_campaign=mc-202402-t2-sodl-xdb-ubi-gc-all)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/se2eajmmmhygjxtuvonz.jpg)](https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/the-azure-ai-extension-to-azure-database-for-postgresql/ba-p/4068932)  

[The azure_ai Extension to Azure Database for PostgreSQL](https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/the-azure-ai-extension-to-azure-database-for-postgresql/ba-p/4068932) — One benefit of Microsoft’s close relationship with OpenAI is that it’s available directly within Azure, and now you can directly work with Azure OpenAI from within _Azure Database for PostgreSQL_ using the `azure_ai` extension, as well as `pgvector` to work with any embedding-based results of that work. Claire shows off how this all looks in practice in [▶️ this five minute screencast.](https://www.youtube.com/watch?v=em0PKDGzzlQ) 

Claire Giordano (Microsoft)   

[PGlite: Postgres in WebAssembly](https://github.com/electric-sql/pglite) — People have brought Postgres into WebAssembly contexts before, though usually with a Linux VM layer sat in between. PGlite packages a WASM build of Postgres into a TypeScript library that can be run in the browser or on Node.js or Bun and is only 3.7MB gzipped! An exciting development - we look forward to seeing where it goes next. 

ElectricSQL / Neon   

💡 You can play with a real world PGlite deployment [in this simple browser-based playground](https://codapi.org/postgres-pglite/) by Anton Zhiyanov.  [![\](https://copm.s3.amazonaws.com/bf7a953b.png)](https://www.red-gate.com/solutions/entrypage/state-of-database-landscape-2024/multiple-database-platforms?utm_source=postgresweekly&utm_medium=email&utm_campaign=mc-202402-t2-sodl-xdb-ubi-gc-all) 

[The State of the Database Landscape 2024](https://www.red-gate.com/solutions/entrypage/state-of-database-landscape-2024/multiple-database-platforms?utm_source=postgresweekly&utm_medium=email&utm_campaign=mc-202402-t2-sodl-xdb-ubi-gc-all) — Redgate’s latest survey results show that PostgreSQL continues to be in the top four most used databases as organizations continue to embrace multiple database platforms. [Find out more](https://www.red-gate.com/solutions/entrypage/state-of-database-landscape-2024/multiple-database-platforms?utm_source=postgresweekly&utm_medium=email&utm_campaign=mc-202402-t2-sodl-xdb-ubi-gc-all) about the latest trends in the database landscape. 

Redgate Software sponsor   

[The Rest is History: Investigations of WAL](https://www.crunchydata.com/blog/the-rest-is-history-investigations-of-wal-history-files) — Get a deeper insight into just what the WAL files used by Postgres contain as Brian steps through reviewing the Write-Ahead Log history as part of a sample recovery scenario. 

Brian Pace (Crunchy Data)   

[11 Lessons to Learn When Using NULLs](https://dev.to/ftisiot/11-lessons-to-learn-when-using-nulls-in-postgresqlr-2b7g) — `NULL` represents a missing, unknown or ‘non’-value in SQL and it has some interesting properties and behaviors to be aware of. 

Francesco Tisiot   

_IN BRIEF:_ 

- Postgres provider ElephantSQL has [announced an end-of-life to its Postgres services](https://www.elephantsql.com/eol.html) with an eventual shutdown in early 2025.
- David Wheeler will be hosting a Postgres [Extension Ecosystem Summit](https://justatheory.com/2024/02/extension-ecosystem-summit/) as part of [PGConf](https://2024.pgconf.dev/) in Vancouver, Canada this May.
- Over on the pgsql-hackers list, Andrew Atkinson has posted about [creating an improved README experience](https://www.postgresql.org/message-id/CAG6XLEmGE95DdKqjk%2BDd9vC8mfN7BnV2WFgYk_9ovW6ikN0YSg%40mail.gmail.com) for newcomers to Postgres.   

[The Two Types of Indexes in pgvector](https://stormatics.tech/blogs/understanding-indexes-in-pgvector) — [pgvector](https://github.com/pgvector/pgvector) is a popular extension for working with and querying against vectors, and vectors demand different index types from the norm. Semab compares the IVFFLAT and HNSW options on offer. 

Semab Tariq (Stormatics)   

[The Default Value of `fdw_tuple_cost` Was Updated to 0.2 – Why?](https://stormatics.tech/blogs/the-default-value-of-fdw_tuple_cost-was-updated-to-0-2-what-does-that-mean) — A quick look at [a recent change](https://www.postgresql.org/message-id/flat/E1qyMYT-003VkZ-Mc%40gemulon.postgresql.org) to Postgres. 

Umair Shahid (Stormatics)   

[When Less is More: Database Connection Scaling](https://richyen.com/postgres/2021/09/03/less-is-more-max-connections.html) — The more connections a Postgres server can handle, the better.. right? Not always. If `max_connections` is set to an unrealistic number, even if those connections aren’t being used, negative effects can be felt. _(A classic article, but potentially worth revisiting.)_ 

Richard Yen      

📰 Classifieds   

Want to scale your app to millions of users? 📈 Learn how to confidently [autoscale your database](https://neon.tech/blog/autoscaling-in-action-postgres-load-testing-with-pgbench?utm_source=cooperpress&utm_medium=newsletter&utm_campaign=postgresweekly&utm_content=classified) to always perform under real-world demands. 

--- 

📢 Free Distributed Postgres DB with 3 node cluster and 1-click provisioning across 3 regions from pgEdge Cloud. [Sign up and get a cool t-shirt](https://www.pgedge.com/get-started/cloud?utm_campaign=Cloud%20Developer%20Launch&utm_source=Postgres%20Weekly%20Sponsorship&utm_medium=Postgres%20Weekly&utm_term=Postgres%20Weekly&utm_content=Postgres%20Weekly).      

[Installing Postgres on SLES 15 Just Got Easier (and Better)](https://people.planetpostgresql.org/devrim/index.php?/archives/122-Installing-PostgreSQL-on-SLES-15-just-got-easier-and-better!.html#slesbetter) — One for SuSE Enterprise Linux users. 

David Detter   

[Maximizing Microservice Databases with Kubernetes, Postgres, and CloudNativePG](https://gabrielebartolini.it/articles/2024/02/maximizing-microservice-databases-with-kubernetes-postgres-and-cloudnativepg/) 
Gabriele Bartolini    

🛠 Code and Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/zxexum9qj7kpbhiyth6h.jpg)](https://github.com/jnidzwetzki/pg-lock-tracer)   

[pg-lock-tracer: An eBPF-Based Lock Tracer](https://github.com/jnidzwetzki/pg-lock-tracer) — Use eBPF instrumentation to dig into lock-related bottlenecks in Postgres when running on Linux. Unlike with `pg_locks`, you get a continuous view of the locking activity and timings, and can produce animated views of locks. 

Jan Nidzwetzki   

[pgagroal 1.6: A High Performance Postgres Connection Pool](https://agroal.github.io/pgagroal//release/announcement/2024/02/22/pgagroal-1.6.0.html) — Introduces support for CLI/JSON output, client certificates, as well as macOS. 

Red Hat Inc.   

[pg_dumpbinary v2.15: Dump a Postgres Database to Binary Format](https://www.postgresql.org/about/news/pg_dumpbinary-v215-released-2811/) — Rather than produce a SQL dump, this produces a binary one (which can be restored by the accompanying `pg_restorebinary` tool). There are various edge cases where a binary dump may be preferable, such as when using (very) large `bytea` columns or custom types that use `\0` values that can break standard dumps. 

HexaCluster   

- [Zapatos 6.4](https://jawj.github.io/zapatos/) – Zero-abstraction type-safe Postgres for TypeScript: a non-ORM database library.
- [Postgres JDBC Updates](https://www.postgresql.org/about/news/postgresql-jdbc-4272-4261-4255-4244-4239-42228-and-42228jre7-security-update-for-cve-2024-1597-2812/) – Releases of all maintained versions to address [CVE-2024-1597.](https://www.cve.org/CVERecord?id=CVE-2024-1597)
- [Lantern 0.2](https://github.com/lanterndata/lantern) – A new HNSW/[usearch](https://github.com/unum-cloud/usearch) vector extension for Postgres.
- [SQLpage 0.19](https://sql.ophir.dev/) – SQL-only webapp builder for data analysts.
- [pg_graphql 1.5.1](https://github.com/supabase/pg_graphql/releases/tag/v1.5.1) – Bring GraphQL support to Postgres.
- [Good Job 3.25](https://github.com/bensheldon/good_job) – Postgres-backed job queue for Rails.    

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