---
title: "Azure takes Postgres into the Cosmos"
publication: "Postgres Weekly"
issue: 478
published_at: "2022-10-26"
canonical_url: "https://postgresweekly.com/issues/478"
---

Plus Postgres vs Python, and what is a stray '1=1' doing in my SQL query? |        

#​478 — October 26, 2022 

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

Together with [![pgAnalyze logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_350,h_100/e_make_transparent/co_white,e_outline:7/lhwcvgc1asd4fzaahty4.png)](https://pganalyze.com/ebooks/postgres-indexing?utm_source=PostgresWeeklyPrimary10262022)  

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/be7nsbrxgv0mtjycgxle.jpg)](https://postgresml.org/blog/postgresml-is-8x-faster-than-python-http-microservices/)  

['PostgresML Is 8-40x Faster Than Python HTTP Microservices'](https://postgresml.org/blog/postgresml-is-8x-faster-than-python-http-microservices/) — Postgres gets compared to MySQL, SQL Server or Oracle all the time.. but Python? [PostgresML](https://postgresml.org/) is a Postgres extension for training and deploying machine learning models. It’s a task more commonly associated with Python, but Postgres offers a compelling, if quite different, interface and Lev has the numbers to prove it. 

Lev Kokotov (PostgresML)   [![\](https://copm.s3.amazonaws.com/663488b5.png)](https://pganalyze.com/ebooks/postgres-indexing?utm_source=PostgresWeeklyPrimary10262022) 

[Free eBook: Effective Indexing in Postgres](https://pganalyze.com/ebooks/postgres-indexing?utm_source=PostgresWeeklyPrimary10262022) — Learn how to create the best Postgres index for your queries. We provide a deep dive into index types, operators, data types and more. Creating the right indexes can often improve your query performance by 10x or even 100x. 

pganalyze sponsor   

[Azure Cosmos DB Brings in Distributed Postgres](https://devblogs.microsoft.com/cosmosdb/distributed-postgresql-comes-to-azure-cosmos-db/) — _Azure Cosmos DB_ is a long-standing ‘multi-model’ managed database from Azure that has typically focused on providing _NoSQL_ services with multi-region, global availability, so it’s curious to see Postgres support being introduced. In short, _Azure Database for PostgreSQL_'s _Hyperscale (Citus)_ offering is now.. this. 

Erdogan and Cubukcu (Microsoft)   

▶[Postgres FM: A Weekly Postgres Podcast](https://postgres.fm/) — We’ve mentioned this show a few times, but it deserves a little extra support, especially as it has kept going every week without dropping off (quite an achievement for a new podcast!) Recent shows cover topics including [stored procedures](https://postgres.fm/episodes/stored-procedures), [Postgres 15](https://postgres.fm/episodes/postgresql-15) and [query optimization.](https://postgres.fm/episodes/102-query-optimization) 

Postgres FM podcast   

**IN BRIEF:** 

- Amazon RDS now supports [up to 15 read replicas](https://aws.amazon.com/about-aws/whats-new/2022/10/amazon-rds-mysql-mariadb-postgre-sql-support-15-read-replicas-3x-read-capacity/) per instance (with up to 5 cross region read replicas) for 3x read capacity.
- _Azure Cosmos DB_'s Postgres support may be newly released, but [it already supports Postgres 15](https://devblogs.microsoft.com/cosmosdb/postgres-15-available-in-azure-cosmos-db-for-postgresql/).   

👶 [Picking a Baby Name with Postgres and FuzzyStrMatch](https://aiven.io/blog/picking-a-baby-name) — Admittedly Postgres wasn’t quite on my mind when picking the names of my children, but.. it’s up to the task! Postgres’s [fuzzystrmatch module](https://www.postgresql.org/docs/current/fuzzystrmatch.html) is used to find names that are _similar_ to others you like. Of course, this could be useful for a lot more than names. 

Francesco Tisiot (Aiven)   

📍 [Routing with Lines through Polygons](https://blog.rustprooflabs.com/2022/10/pgrouting-lines-through-polygons) — I need to spend some time with PostGIS because it always looks a bit like magic to me, but Ryan does a great job of showing how coupled with [pgRouting](https://pgrouting.org/) you can pull off some interesting things like routing across ‘polygons’ such as may represent features like lakes or pedestrianized zones. 

Ryan Lambert   

[An `ORDER BY` Improved Our Query Time by 100x](https://webapp.io/blog/postgres-query-speedups/) — It always pays to look at your slow queries and crack out `EXPLAIN` and [pg_stat_statements](https://www.crunchydata.com/blog/tentative-smarter-query-optimization-in-postgres-starts-with-pg_stat_statements) to dig in and find a solution. 

Colin Chartier   

[What Is This `1=1` Doing Here?](https://medium.com/@walttonm/what-is-this-1-1-doing-here-fce96fe83fcd) — An interesting bit of syntax used by a developer to make working with SQL queries easier. 

Waltton Morais   

[SSH Best Practices using Certificates, 2FA and Bastions](https://goteleport.com/blog/how-to-ssh-properly/?utm_campaign=eg&utm_medium=partner&utm_source=postgres) 

Teleport sponsor   

[Logging with JSON in Postgres 15](https://fluca1978.github.io/2022/10/21/PostgreSQL15JsonLogs.html) — One of 15’s new features is the `jsonlog` format for logging – Luca shows the basics of turning it on. 

Luca Ferrari   

[Migrating IDs from `serial` to Identity After Upgrading to Django 4.1](https://adamj.eu/tech/2022/10/21/migrate-postgresql-ids-serial-identity-django-4.1/) 
Adam Johnson    

🛠 Code and Tools  

- [pgx 0.5.6](https://github.com/tcdi/pgx)
 ↳ Build Postgres extensions with Rust.
- [SeaORM 0.10](https://github.com/SeaQL/sea-orm)
 ↳ Async and dynamic ORM for Rust.
- [Piccolo 0.94](https://github.com/piccolo-orm/piccolo)
 ↳ Fast, asyncio-compatible ORM and query builder for Python.
- [OctoSQL 0.12](https://github.com/cube2222/octosql)
 ↳ Cross-database querying and joining CLI tool.
- [Slonik 32.0](https://github.com/gajus/slonik)
 ↳ Node.js Postgres client focused on type safety.
- [tds_fdw 2.0.3](https://github.com/tds-fdw/tds_fdw)
 ↳ Foreign data wrapper to TDS databases (Sybase / SQL Server).
- [pgsodium 3.0.6](https://github.com/michelp/pgsodium)
 ↳ libsodium-powered cryptography for Postgres.
- [pg-boss 8.1.1](https://github.com/timgit/pg-boss)
 ↳ Postgres-based job queuing system for Node.js.    

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