Citus Blog

Articles tagged: Postgres

Marco Slot

Making PostgreSQL tick: New features in pg_cron

Written byBy Marco Slot | October 26, 2023Oct 26, 2023

pg_cron is an open source PostgreSQL extension that provides a cron-based scheduler to periodically run SQL commands. Almost every managed PostgreSQL service supports pg_cron and it has become a standard tool for many PostgreSQL users. Since Citus has been my full-time job, pg_cron has always been a side project for me, and so I tried to architect it for simplicity, reliability, and low maintenance. Of course, with many users there is a long list of feature requests, and with the help of the Postgres community pg_cron keeps becoming more and more capable over time.

We recently added PostgreSQL 16 support (in version 1.6), but perhaps the most exciting feature added to pg_cron in the past year (in version 1.5) is the ability to schedule a job every few seconds. I shunned this feature idea for a while, because (a) it is not something regular cron can do; and (b) any issue in pg_cron would get much more severe if it were to happen every few seconds. However, by now pg_cron is reasonably battle-tested and second-granularity jobs had become the most popular pg_cron feature request by far.

Keep reading

Big news in the Postgres world: PostgreSQL 16 was released just over 2 weeks ago. And today we're announcing that Postgres 16 is generally available for production workloads on Azure Cosmos DB for PostgreSQL. That's right, in production: this announcement is not just a preview of Postgres 16 support.

Whether you need to provision a new distributed Postgres cluster in Azure Cosmos DB for PostgreSQL—or upgrade your existing database clusters—Postgres 16 is now an option for you.

And you can use Azure Portal, Bicep or ARM templates, REST APIs, Azure SDKs, or Azure CLI to spin up a new Postgres 16 cluster in Azure Cosmos DB for PostgreSQL, or to upgrade an existing cluster to Postgres 16.

Keep reading
Teresa Giacomini

The Story Behind the Activity Book for Postgres

Written byBy Teresa Giacomini | September 28, 2023Sep 28, 2023

Version 3 of the “Activity Book for Postgres” is hot off the press. And you can get your own copy if you come say hello at the Microsoft booth at the PGConf NYC and PGConf EU conferences in 2023. The Activity Book will also be available at other Postgres meetups and smaller PGDay events that our team attends throughout the year (and it was one of the giveaways at Citus Con: An Event for Postgres earlier this year, too.)

Whether you have kids, or nieces, or nephews—or perhaps you yourself find coloring a useful way to distract your hands while your mind tackles complex problems—you can likely put the book to good use. And who doesn’t like a good bad database joke?

In this post, you’ll find out about the inspiration for the book, as well as the hidden meaning behind each of the pages—and a way to request your own copy.

Keep reading

The new PostgreSQL 16 release is out, packed with exciting improvements and features—and Citus 12.1 brings them to you at scale, within just one week of the PG16 release.

As many of you likely know, Citus is an open source PostgreSQL extension that turns Postgres into a distributed database. Our team started integrating Citus with the PG16 beta and release candidates early-on, so that you could have a new Citus 12.1 release that is compatible with Postgres 16 as quickly as possible after PG16 came out.

There are a lot of good reasons to upgrade to Postgres 16—huge thanks to everyone who contributed into this Postgres release! PG16 highlights include query performance boost with more parallelism; load balancing with multiple hosts in libpq (contributed by my Citus teammate, Jelte Fennema-Nio); I/O monitoring with pg_stat_io; developer experience enhancements; finer-grained options for access control; logical replication from standby servers and other replication improvements, like using btree indexes in the absence of a primary key (contributed by one of my teammates, Onder Kalaci.)

The good news for those of you who care about distributed Postgres: Citus 12.1 is now available and adds support for Postgres 16.

In addition to Postgres 16 support, Citus 12.1 includes enhancements to schema-based sharding, which was recently added to Citus 12.0—and is super useful for multi-tenant SaaS applications.

Keep reading

With so many Postgres conferences coming up soon, it seemed fitting to share some highlights from a past episode of the Path To Citus Con about why to give talks at Postgres conferences. This episode was recorded back in May 2023 and shares an hourlong conversation between some wonderful Postgres engineers—Álvaro Herrera and Boriss Mejías—along with my co-host Pino de Candia and me.

The guests both have deep roots in the community—Álvaro as a Postgres committer and Boriss as a frequent conference speaker as well as the organizer for the PgBE PostgreSQL User Group Belgium. And they have known each other for decades, since university days. As much as Alvaro and Boriss have in common, it’s interesting to hear them talk about their totally different approaches to giving talks at conferences.

There’s also a point in the podcast where we explore whether it helps to be an introvert, or an extrovert, when it comes to giving conference talks. And how speaking at conferences can make it easier to meet people… after you’ve given a talk, people will often walk up to you and say “hey I saw your talk, I want to ask you about <insert PG topic here>”.

Keep reading

The latest episode of Path To Citus Con—the monthly podcast for developers who love Postgres—is now out. This episode featured guests Paul Ramsey and Regina Obe on the topic “Why people care about PostGIS and Postgres”.

The conversation was all about PostGIS, a geospatial extension to Postgres which just happens to be one the most popular Postgres extensions. This episode was fairly technical, but still fascinating. The discussion ranged all the way from cartesian math at one point to how it’s very difficult to construct a database these days without a location component. This episode of Path To Citus Con focuses on the geospatial world of Postgres and shows how “where” is one of the fundamental things we all want to know about.

In this post, you’ll get a bit of backstory on the topic and the guests—both with a long history with PostGIS—of this episode of Path To Citus Con; and you’ll get a peek at key moments from this show, including the extensibility of Postgres demonstrated by PostGIS, “where” as the universal foreign key, and more. At the end of the post, you’ll find links of where you can listen to this and every episode of the podcast. We hope you love these “human side of Postgres” podcast episodes.

Keep reading
Claire Giordano

What’s new with Postgres at Microsoft (August 2023)

Written byBy Claire Giordano | August 31, 2023Aug 31, 2023

On one of the Postgres community chat forums, a friend asked me: "Is there a blog post that outlines all the work that is being done on Postgres at Microsoft? It's hard to keep track these days."

And my friend is right: it is hard to keep track. Probably because there are multiple Postgres workstreams at Microsoft, spread across a few different teams.

In this post, you'll get a bird's eye view of all the Postgres work the Microsoft team has done over the last year. Our work includes some pretty significant improvements to the Postgres managed services on Azure, as well as contributions across the entire open source ecosystem—including commits to the Postgres core; new releases to Postgres open source extensions like Citus and pg_cron; plus ecosystem work on Patroni, PgBouncer, pgcopydb. And more.

Keep reading

The latest episode of Path To Citus Con—the monthly podcast for developers who love Postgres—is now out. This 6th episode featured guests Chelsea Dole and Floor Drees on the topic “You’re probably already using Postgres: What you need to know”.

The conversation explored the app developer perspective on Postgres. Many of you app developers are already using Postgres, but perhaps on top of an ORM. If you want to optimize your application, if you want to better understand the underlying database: what do you need to know? And how do you remove the fear? This episode of Path To Citus Con, our new podcast for developers who love Postgres, focuses on opportunities for building your knowledge in the database internals space—whether you want to go breadth-first or depth-first.

In this post, you’ll get a bit of backstory on the topic and the guests of Episode 06 of Path To Citus Con; and you’ll get a peek at highlights of a few interesting moments from the show. At the end of the post, you’ll find all the links of where you can listen to this and every episode of the podcast. Some people love these “human side of Postgres” podcast episodes—hopefully you will, too.

Keep reading

The topic of this month's PGSQL Phriday #011 community blogging event is partitioning vs. sharding in PostgreSQL. It seemed right to share a perspective on the question of "partitioning vs. sharding" from someone in the Citus open source team, since we eat, sleep, and breathe sharding for Postgres.

Postgres built-in "native" partitioning—and sharding via PG extensions like Citus—are both tools to grow your Postgres database, scale your application, and improve your application's performance.

What is partitioning and what is sharding? In Postgres, database partitioning and sharding are techniques for splitting collections of data into smaller sets, so the database only needs to process smaller chunks of data at a time. And as you might imagine, work gets done faster when you're processing less data.

In this post, you'll learn what partitioning and sharding are, why they matter, and when to use them. The table of contents:

Keep reading
Onur Tirtir

Schema-based sharding comes to PostgreSQL with Citus

Written byBy Onur Tirtir | July 31, 2023Jul 31, 2023

Citus, a database scaling extension for PostgreSQL, is known for its ability to shard data tables and efficiently distribute workloads across multiple nodes. With Citus 12.0, Citus introduces a very exciting feature called schema-based sharding. The new schema-based sharding feature gives you a choice of how to distribute your data across a cluster, and for some data models (think: multi-tenant apps, microservices, etc.) this schema-based sharding approach may be significantly easier!

In this blog post, we will take a deep dive into the new schema-based sharding feature, and you will learn:

Keep reading

Page 2 of 15