---
title: "Rust's benefits for building Postgres extensions"
publication: "Postgres Weekly"
issue: 472
published_at: "2022-09-21"
canonical_url: "https://postgresweekly.com/issues/472"
---

Plus pg_activity 3.0, and other handy Postgres CLI tools. |        

#​472 — September 21, 2022 

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

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/yunuozfyybzlxswa1zc6.jpg)](https://github.com/dalibo/pg_activity)  

[pg_activity 3.0: `htop`-Like Activity Monitoring Tool](https://github.com/dalibo/pg_activity) — Much as you might use top or htop to monitor processes and CPU usage, `pg_activity` gives you a similar look behind the scenes of Postgres with views over running queries, up to date performance stats, and more. 

Dalibo   [![\](https://copm.s3.amazonaws.com/b8e5dd49.png)](https://www.crunchydata.com/migrate-from-heroku?utm_source=cppg-prim-0921) 

[Migrating Postgres from Heroku to Crunchy Bridge](https://www.crunchydata.com/migrate-from-heroku?utm_source=cppg-prim-0921) — Developers of a growing business were looking to migrate Postgres. They wanted a new vendor at least as good as Heroku, with new features and developer tools. They tested Amazon RDS and several others. Find out why they chose Crunchy Bridge for their cloud Postgres. [Read the case study](https://www.crunchydata.com/case-studies/calibre?utm_source=cppg-prim-0921). 

Crunchy Data sponsor   

🦀 [PostgresML Moving to Rust For Its 2.0 Release](https://postgresml.org/blog/postgresml-is-moving-to-rust-for-our-2.0-release/) — The idea of using Rust to build Postgres extensions is slowly gathering pace. The creators of the [PostgresML](https://postgresml.org/) extension that adds ML model training and querying to Postgres gave Rust a go and have been so struck by the performance improvements, they’re going all in. 

Montana Low   

[Sequences vs. Invoice Numbers](https://www.cybertec-postgresql.com/en/postgresql-sequences-vs-invoice-numbers/) — Postgres [sequences](https://www.postgresql.org/docs/current/sql-createsequence.html) provide a handy abstraction around the generation of ID numbers, so surely they’d be good for _invoice_ numbers too? Not so fast, says Hans-Jürgen (note that his specified criteria for the legality of invoice numbers varies by jurisdiction). 

Hans-Jürgen Schönig   

[Using the Timescale Gem with Ruby](https://ideia.me/using-the-timescale-gem-with-ruby) — [TimescaleDB](https://github.com/timescale/timescaledb) is the extension that turns Postgres into a fully-fledged _time series_ database and this thorough walkthrough demonstrates its use from Ruby. 

Jônatas Davi Paganini   

[▶️ Webinar Tomorrow: Optimizing Postgres I/O Performance & Costs](https://us02web.zoom.us/webinar/register/6516619703007/WN_SFk4TeWlTV29xYsgtm247g) 

pganalyze sponsor   

[An Overview of Postgres Data Flow](https://www.crunchydata.com/blog/postgres-data-flow) — A high-level look at where data in a Postgres-based system might actually be going to and coming from, including caches, connection poolers, and buffers. A diagram wraps up the main ideas. 

David Christensen   

**IN BRIEF:** 

- Microsoft's Marco Slot writes in his usual accessible yet technical style about [the advancements in Citus 11.1](https://www.citusdata.com/blog/2022/09/19/citus-11-1-shards-postgres-tables-without-interruption/) including being able to distribute tables, isolate tenants, and split shards without blocking writes or interruptions. [Release notes here](https://www.citusdata.com/updates/v11-1/).
- Google Cloud has unveiled [a preview of AlloyDB support in _Database Migration Service._](https://cloud.google.com/blog/products/databases/database-migration-service-supports-migration-to-alloydb-for-postgresql) AlloyDB is Google's Postgres-compatible Aurora-esque fully managed cloud data offering.
- [Convert Oracle partitions and sub-partitions to Amazon RDS for PostgreSQL or Amazon Aurora PostgreSQL](https://aws.amazon.com/blogs/database/convert-oracle-partitions-and-sub-partitions-to-amazon-rds-for-postgresql-or-amazon-aurora-postgresql/)
 ↳ AWS continues its support for Oracle to Postgres migrations.
- [How a Data Scientist Is Building a Time-Series Forecasting Pipeline Using TimescaleDB](https://www.timescale.com/blog/how-a-data-scientist-is-building-a-time-series-forecasting-pipeline-using-timescaledb-and-helping-others-perform-time-series-engineering-directly-in-the-database/)
 ↳ A look behind the scenes at a Timescale use case.    

🛠 Code and Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/iu9abzapntg10e9mqecu.jpg)](https://github.com/okbob/pspg)   

[pspg 5.5.7: A Unix Pager Designed for Postgres Tables](https://github.com/okbob/pspg) — If you use `psql` you probably use `less` as your pager, but it doesn’t directly support tabular data. This does. We’ve linked it a few times over the years, but it’s come such a long way and deserves fresh attention, particularly as it now supports paging output from _numerous_ database CLI tools. Plus it reminds me of Borland-era DOS IDEs and I’m all here for that. 

Pavel Stehule   

[pgenv 1.3.2: A Postgres Virtual Environment Manager](https://fluca1978.github.io/2022/09/20/pgenv1.3.2.html) — pgenv is a shell script based ‘manager’ for working with multiple versions of Postgres at the same time on the same system. [GitHub repo](https://github.com/theory/pgenv). 

Luca Ferrari   

[dblab: An Interactive Client for Postgres, MySQL, and SQLite3](https://github.com/danvergara/dblab) — A cross-platform (yes, including Windows) TUI-style app for working with various database systems. Certainly looks rather different to the standard CLI clients! 

Daniel Omar Vergara Pérez   

- [plpgsql_check 2.2](https://github.com/okbob/plpgsql_check)
 ↳ Static analysis and linting for PL/pgSQL.
- [pev2 1.5](https://github.com/dalibo/pev2)
 ↳ Vue.js component to visualize Postgres execution plans.
- [Redix 5.2](https://github.com/alash3al/redix)
 ↳ Speaks Redis, stores data on Postgres.
- [Npgsql 6.0.7](https://github.com/npgsql/npgsql)
 ↳ .NET data provider for Postgres.
- [Selda 0.5.2](https://github.com/valderman/selda)
 ↳ Type-safe LINQ-inspired SQL library for Haskell.
- [pgsync 0.7.2](https://github.com/ankane/pgsync)
 ↳ Sync data from one Postgres database to another.    

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