---
title: "How to monitor Postgres's network usage"
publication: "Postgres Weekly"
issue: 471
published_at: "2022-09-14"
canonical_url: "https://postgresweekly.com/issues/471"
---

Plus a new way to generate IDs, transaction snapshots, and even a fresh Postgres 15 beta. |        

#​471 — September 14, 2022 

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

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/y865x5tl8zwchiahdy4i.jpg)](https://supabase.com/blog/choosing-a-postgres-primary-key)  

[Choosing a Primary Key Identifier Format: The Options](https://supabase.com/blog/choosing-a-postgres-primary-key) — Figuring out what data, or even composite of data, to use for a primary key can be tricker than you’d expect, and if you go with a common unique ID approach, which should you use? Victor tours some of Postgres’s many options along with their pros and cons before showing off [an extension](https://github.com/VADOSWARE/pg_idkit) he’s built to help you generate IDs too. 

Victor Vados   

[pg_netstat: Monitor Your Database's Network Traffic](https://github.com/supabase/pg_netstat) — Runs a background worker that uses libpcap to capture packets and aggregates at an interval of your choice. You can then query your database’s realtime network stats through a `pg_netstat` view to see packets in and out, bytes in and out, etc. 

Supabase   [![\](https://copm.s3.amazonaws.com/9aebba17.png)](https://www.linode.com/content/kubernetes-guide/?utm_source=postgres_weekly&utm_medium=newsletter_sponsorship&utm_campaign=&utm_content=&utm_term=) 

[PDF Download: Understanding Kubernetes](https://www.linode.com/content/kubernetes-guide/?utm_source=postgres_weekly&utm_medium=newsletter_sponsorship&utm_campaign=&utm_content=&utm_term=) — Updated for 2022! This resource covers everything from fundamental concepts, to cluster components and network model implementation. The new edition includes the Kubernetes Dashboard, high-availability control plane, and autoscaling. [Get it instantly](https://www.linode.com/content/kubernetes-guide/?utm_source=postgres_weekly&utm_medium=newsletter_sponsorship&utm_campaign=&utm_content=&utm_term=). 

Linode sponsor   

[Working with Transaction Snapshots](https://www.percona.com/blog/working-with-snapshots-in-postgresql/) — This is another handy feature to have in one’s back pocket. Snapshots allow multiple transactions to share identical views of the same database state. This can come in handy when allowing multiple `pg_dump` instances to more quickly build a single dump using the `-j` option, or in more complex data syncing scenarios (there’s a neat example provided in the post). 

Robert Bernier   

[PostgreSQL 15 Beta 4 Released](https://www.postgresql.org/about/news/postgresql-15-beta-4-released-2507/) — One downside to being weekly is when a release drops the day after you publish, and so it went with last Thursday’s release ;-) Luckily it’s a relatively minor step on the road to Postgres 15, mostly fixing up bugs and crashes. 

PostgreSQL Global Development Group   

- 📆 [PostgreSQL Conference Europe 2022](https://2022.pgconf.eu/) is taking place next month in Berlin, Germany, and a neat feature is they'll be [offering daycare for children aged 3-15.](https://www.postgresql.eu/events/pgconfeu2022/news/pgconfeu-2022-daycare-for-children-at-postgresql-conference-europe-62/) If you've struggled to justify an event due to needing childcare, this one should certainly be on your radar.
- CrunchyData's _Karen Jex_ is this week's [PostgreSQL Person of the Week](https://postgresql.life/post/karen_jex/) and she shows off her neat crocheted blue elephants.   

['6 Useful Postgres Features I Wish I Knew When I Started'](https://it.badykov.com/blog/2022/09/12/simple-and-usefull-postgresql-features/) — Identity syntax (vs SERIAL), COALESCE + NULLIF, grouping sets, CTEs, and domains all make an appearance. 

Marat Badykov   

[What's an `INNER JOIN` or `OUTER JOIN` in SQL?](https://www.cybertec-postgresql.com/en/what-is-an-inner-join-in-sql-and-what-is-an-outer-join/) — Steer clear if you’re already a join expert, but otherwise this is a nice introduction / refresher that also breezes through full joins and ‘semi-joins.’ 

Hans-Jürgen Schönig   

[What pgcrypto Does](https://www.crunchydata.com/blog/postgres-pgcrypto) — It made us laugh, but sadly we had to change Paul’s actual ‘crypto’ related headline to avoid hitting the spam filters ;-) Nonetheless, he takes a practical, high level look at the options [pgcrypto](https://www.postgresql.org/docs/current/pgcrypto.html) presents for encrypting and decrypting data inside a database. 

Paul Ramsey   

[How and Why Citus Took Distributed Postgres Fully Open Source](https://www.citusdata.com/blog/2022/09/12/distributed-postgres-goes-full-open-source-with-citus/) — The inside story on why Citus / Microsoft open sourced their few remaining enterprise features in Citus 11, what exactly _was_ open sourced, and what it took to make it happen. 

Jelte Fennema (Citus Data)    

🛠 Code and Tools  

[pg_idkit: An Extension for Generating IDs](https://github.com/VADOSWARE/pg_idkit) — Covered in the [Choosing a Postgres Primary Key](https://supabase.com/blog/choosing-a-postgres-primary-key) article featured above, this Rust-built extension offers up a myriad of different unique ID schemes from UUIDs to NanoIDs and ksuids. 

VADOSWARE LLC   

[Move Mission Critical Applications to the Cloud…Faster](https://www.enterprisedb.com/products/biganimal-cloud-postgresql?utm_source=edb&utm_medium=newsletter&utm_campaign=GL-NL-2022-0914--PGweeklynewsletter) 

EDB BigAnimal sponsor   

[Apache AGE 1.1.0: Graph Extensions for Postgres](https://www.postgresql.org/about/news/announcing-the-release-of-apache-age-110-2504/) — AGE (A Graph Extension) was inspired by AgensGraph, a multi-model database Bitnine built from PostgreSQL 10, and brings graph processing and analytics features to Postgres via both OpenCypher and SQL. [Homepage.](https://age.apache.org/) 

Apache Foundation   

- [pgBadger 12.0](https://github.com/darold/pgbadger)
 ↳ The fast Postgres log analyzer.
- [pgHero 3.0](https://github.com/ankane/pghero)
 ↳ A performance dashboard for Postgres    

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